llvm-project/llvm/lib/Target/XCore
Akira Hatanaka 22e839f4b2 [AArch64] Improve code generation for logical instructions taking
immediate operands.

This commit adds an AArch64 dag-combine that optimizes code generation
for logical instructions taking immediate operands. The optimization
uses demanded bits to change a logical instruction's immediate operand
so that the immediate can be folded into the immediate field of the
instruction.

This recommits r300932 and r300930, which was causing dag-combine to
loop forever. The problem was that optimizeLogicalImm was returning
true even when there was no change to the immediate node (which happened
when the immediate was all zeros or ones), which caused dag-combine to
push and pop the same node to the work list over and over again without
making any progress.

This commit fixes the bug by returning false early in optimizeLogicalImm
if the immediate is all zeros or ones. Also, it changes the code to
compare the immediate with 0 or Mask rather than calling
countPopulation.

rdar://problem/18231627

Differential Revision: https://reviews.llvm.org/D5591

llvm-svn: 301019
2017-04-21 18:53:12 +00:00
..
Disassembler Fix "static initialization order fiasco" for the XCore Target. 2016-10-11 18:22:41 +00:00
InstPrinter [XCore] Fix some Include What You Use warnings; other minor fixes (NFC). 2017-02-03 21:46:55 +00:00
MCTargetDesc [XCore] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-24 23:02:48 +00:00
TargetInfo Fix "static initialization order fiasco" for the XCore Target. 2016-10-11 18:22:41 +00:00
CMakeLists.txt
LLVMBuild.txt
README.txt
XCore.h
XCore.td
XCoreAsmPrinter.cpp [MC] Refactor emitELFSize to make usage more consistent. NFC. 2016-12-01 23:39:08 +00:00
XCoreCallingConv.td
XCoreFrameLowering.cpp Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
XCoreFrameLowering.h
XCoreFrameToArgsOffsetElim.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
XCoreISelDAGToDAG.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
XCoreISelLowering.cpp [AArch64] Improve code generation for logical instructions taking 2017-04-21 18:53:12 +00:00
XCoreISelLowering.h [DAGCombiner] Add vector demanded elements support to computeKnownBitsForTargetNode 2017-03-31 11:24:16 +00:00
XCoreInstrFormats.td
XCoreInstrInfo.cpp Finish renaming remaining analyzeBranch functions 2016-09-14 20:43:16 +00:00
XCoreInstrInfo.h Finish renaming remaining analyzeBranch functions 2016-09-14 20:43:16 +00:00
XCoreInstrInfo.td Target: Remove unused patterns and transforms. NFC. 2016-10-07 00:30:49 +00:00
XCoreLowerThreadLocal.cpp
XCoreMCInstLower.cpp Actually remove the Mangler from the AsmPrinter and clean up the places it was "used" but not used. 2016-09-16 17:07:23 +00:00
XCoreMCInstLower.h Actually remove the Mangler from the AsmPrinter and clean up the places it was "used" but not used. 2016-09-16 17:07:23 +00:00
XCoreMachineFunctionInfo.cpp
XCoreMachineFunctionInfo.h [XCore] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-24 23:02:48 +00:00
XCoreRegisterInfo.cpp
XCoreRegisterInfo.h
XCoreRegisterInfo.td
XCoreSelectionDAGInfo.cpp Make library calls sensitive to regparm module flag (Fixes PR3997). 2017-03-18 00:44:07 +00:00
XCoreSelectionDAGInfo.h
XCoreSubtarget.cpp
XCoreSubtarget.h
XCoreTargetMachine.cpp [XCore] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-24 23:02:48 +00:00
XCoreTargetMachine.h [XCore] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-24 23:02:48 +00:00
XCoreTargetObjectFile.cpp Target: Change various section classifiers in TargetLoweringObjectFile to take a GlobalObject. 2016-10-24 19:23:39 +00:00
XCoreTargetObjectFile.h Target: Change various section classifiers in TargetLoweringObjectFile to take a GlobalObject. 2016-10-24 19:23:39 +00:00
XCoreTargetStreamer.h
XCoreTargetTransformInfo.h Do a sweep over move ctors and remove those that are identical to the default. 2016-10-20 12:20:28 +00:00

README.txt

To-do
-----

* Instruction encodings
* Tailcalls
* Investigate loop alignment
* Add builtins