FailedChanges

Summary

  1. [llvm-dwarfdump] Adjust Windows path to be acceptable by JSON Backslash is a special character according to JSON specification, so we should avoid that when printing a file path with the --statistics option. Differential Revision: https://reviews.llvm.org/D67699
  2. [yaml2obj/obj2yaml] - Do not trigger llvm_unreachable when dumping/parsing relocations and e_machine is unsupported. Currently when e_machine is set to something that is not supported by YAML lib, then tools fail with llvm_unreachable. In this patch I allow them to handle relocations in this case. It can be used to dump and create objects for broken or unsupported targets. Differential revision: https://reviews.llvm.org/D67657
  3. [MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount The way MachinePipeliner uses these target hooks is stateful - we reduce trip count by one per call to reduceLoopCount. It's a little overfit for hardware loops, where we don't have to worry about stitching a loop induction variable across prologs and epilogs (the induction variable is implicit). This patch introduces a new API: /// Analyze loop L, which must be a single-basic-block loop, and if the /// conditions can be understood enough produce a PipelinerLoopInfo object. virtual std::unique_ptr<PipelinerLoopInfo> analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const; The return value is expected to be an implementation of the abstract class: /// Object returned by analyzeLoopForPipelining. Allows software pipelining /// implementations to query attributes of the loop being pipelined. class PipelinerLoopInfo { public: virtual ~PipelinerLoopInfo(); /// Return true if the given instruction should not be pipelined and should /// be ignored. An example could be a loop comparison, or induction variable /// update with no users being pipelined. virtual bool shouldIgnoreForPipelining(const MachineInstr *MI) const = 0; /// Create a condition to determine if the trip count of the loop is greater /// than TC. /// /// If the trip count is statically known to be greater than TC, return /// true. If the trip count is statically known to be not greater than TC, /// return false. Otherwise return nullopt and fill out Cond with the test /// condition. virtual Optional<bool> createTripCountGreaterCondition(int TC, MachineBasicBlock &MBB, SmallVectorImpl<MachineOperand> &Cond) = 0; /// Modify the loop such that the trip count is /// OriginalTC + TripCountAdjust. virtual void adjustTripCount(int TripCountAdjust) = 0; /// Called when the loop's preheader has been modified to NewPreheader. virtual void setPreheader(MachineBasicBlock *NewPreheader) = 0; /// Called when the loop is being removed. virtual void disposed() = 0; }; The Pipeliner (ModuloSchedule.cpp) can use this object to modify the loop while allowing the target to hold its own state across all calls. This API, in particular the disjunction of creating a trip count check condition and adjusting the loop, improves the code quality in ModuloSchedule.cpp.
  4. [CallSiteSplitting] Remove unused includes (NFC).
Revision 372378 by djtodoro:
[llvm-dwarfdump] Adjust Windows path to be acceptable by JSON

Backslash is a special character according to JSON specification,
so we should avoid that when printing a file path with the
--statistics option.

Differential Revision: https://reviews.llvm.org/D67699
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/tools/llvm-dwarfdump/Statistics.cpp (diff)llvm.src/tools/llvm-dwarfdump/Statistics.cpp
Revision 372377 by grimar:
[yaml2obj/obj2yaml] - Do not trigger llvm_unreachable when dumping/parsing relocations and e_machine is unsupported.

Currently when e_machine is set to something that is not supported by YAML lib,
then tools fail with llvm_unreachable.

In this patch I allow them to handle relocations in this case.
It can be used to dump and create objects for broken or unsupported targets.

Differential revision: https://reviews.llvm.org/D67657
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/ObjectYAML/ELFYAML.cpp (diff)llvm.src/lib/ObjectYAML/ELFYAML.cpp
The file was added/llvm/trunk/test/tools/obj2yaml/relocation-unsupported-machine.yamlllvm.src/test/tools/obj2yaml/relocation-unsupported-machine.yaml
The file was added/llvm/trunk/test/tools/yaml2obj/relocation-unsupported-machine.yamlllvm.src/test/tools/yaml2obj/relocation-unsupported-machine.yaml
Revision 372376 by jamesm:
[MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount

The way MachinePipeliner uses these target hooks is stateful - we reduce trip
count by one per call to reduceLoopCount. It's a little overfit for hardware
loops, where we don't have to worry about stitching a loop induction variable
across prologs and epilogs (the induction variable is implicit).

This patch introduces a new API:

  /// Analyze loop L, which must be a single-basic-block loop, and if the
  /// conditions can be understood enough produce a PipelinerLoopInfo object.
  virtual std::unique_ptr<PipelinerLoopInfo>
  analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const;

The return value is expected to be an implementation of the abstract class:

  /// Object returned by analyzeLoopForPipelining. Allows software pipelining
  /// implementations to query attributes of the loop being pipelined.
  class PipelinerLoopInfo {
  public:
    virtual ~PipelinerLoopInfo();
    /// Return true if the given instruction should not be pipelined and should
    /// be ignored. An example could be a loop comparison, or induction variable
    /// update with no users being pipelined.
    virtual bool shouldIgnoreForPipelining(const MachineInstr *MI) const = 0;

    /// Create a condition to determine if the trip count of the loop is greater
    /// than TC.
    ///
    /// If the trip count is statically known to be greater than TC, return
    /// true. If the trip count is statically known to be not greater than TC,
    /// return false. Otherwise return nullopt and fill out Cond with the test
    /// condition.
    virtual Optional<bool>
    createTripCountGreaterCondition(int TC, MachineBasicBlock &MBB,
                                 SmallVectorImpl<MachineOperand> &Cond) = 0;

    /// Modify the loop such that the trip count is
    /// OriginalTC + TripCountAdjust.
    virtual void adjustTripCount(int TripCountAdjust) = 0;

    /// Called when the loop's preheader has been modified to NewPreheader.
    virtual void setPreheader(MachineBasicBlock *NewPreheader) = 0;

    /// Called when the loop is being removed.
    virtual void disposed() = 0;
  };

The Pipeliner (ModuloSchedule.cpp) can use this object to modify the loop while
allowing the target to hold its own state across all calls. This API, in
particular the disjunction of creating a trip count check condition and
adjusting the loop, improves the code quality in ModuloSchedule.cpp.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/ModuloSchedule.h (diff)llvm.src/include/llvm/CodeGen/ModuloSchedule.h
The file was modified/llvm/trunk/include/llvm/CodeGen/TargetInstrInfo.h (diff)llvm.src/include/llvm/CodeGen/TargetInstrInfo.h
The file was modified/llvm/trunk/lib/CodeGen/MachinePipeliner.cpp (diff)llvm.src/lib/CodeGen/MachinePipeliner.cpp
The file was modified/llvm/trunk/lib/CodeGen/ModuloSchedule.cpp (diff)llvm.src/lib/CodeGen/ModuloSchedule.cpp
The file was modified/llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp (diff)llvm.src/lib/CodeGen/TargetInstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.cpp (diff)llvm.src/lib/Target/Hexagon/HexagonInstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/Hexagon/HexagonInstrInfo.h (diff)llvm.src/lib/Target/Hexagon/HexagonInstrInfo.h
The file was modified/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp (diff)llvm.src/lib/Target/PowerPC/PPCInstrInfo.cpp
The file was modified/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h (diff)llvm.src/lib/Target/PowerPC/PPCInstrInfo.h
The file was modified/llvm/trunk/test/CodeGen/Hexagon/swp-epilog-phi7.ll (diff)llvm.src/test/CodeGen/Hexagon/swp-epilog-phi7.ll
Revision 372375 by fhahn:
[CallSiteSplitting] Remove unused includes (NFC).
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Transforms/Scalar/CallSiteSplitting.h (diff)llvm.src/include/llvm/Transforms/Scalar/CallSiteSplitting.h