llvm-6502/include/llvm/CodeGen
Juergen Ributzka f08cddcf56 Reapply [FastISel] Let the target decide first if it wants to materialize a constant (215588).
Note: This was originally reverted to track down a buildbot error. This commit
exposed a latent bug that was fixed in r215753. Therefore it is reapplied
without any modifications.

I run it through SPEC2k and SPEC2k6 for AArch64 and it didn't introduce any new
regeressions.

Original commit message:
This changes the order in which FastISel tries to materialize a constant.
Originally it would try to use a simple target-independent approach, which
can lead to the generation of inefficient code.

On X86 this would result in the use of movabsq to materialize any 64bit
integer constant - even for simple and small values such as 0 and 1. Also
some very funny floating-point materialization could be observed too.

On AArch64 it would materialize the constant 0 in a register even the
architecture has an actual "zero" register.

On ARM it would generate unnecessary mov instructions or not use mvn.

This change simply changes the order and always asks the target first if it
likes to materialize the constant. This doesn't fix all the issues
mentioned above, but it enables the targets to implement such
optimizations.

Related to <rdar://problem/17420988>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216006 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 19:05:24 +00:00
..
PBQP Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Analysis.h
AsmPrinter.h
CalcSpillWeights.h
CallingConvLower.h Remove the target machine from CCState. Previously it was only used 2014-08-06 18:45:26 +00:00
CommandFlags.h
DAGCombine.h
DFAPacketizer.h
EdgeBundles.h
FastISel.h Reapply [FastISel] Let the target decide first if it wants to materialize a constant (215588). 2014-08-19 19:05:24 +00:00
FunctionLoweringInfo.h
GCMetadata.h
GCMetadataPrinter.h
GCs.h
GCStrategy.h
IntrinsicLowering.h
ISDOpcodes.h
JITCodeEmitter.h Temporarily Revert "Nuke the old JIT." as it's not quite ready to 2014-08-07 22:02:54 +00:00
JumpInstrTables.h
LatencyPriorityQueue.h
LexicalScopes.h Revert "Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size." 2014-08-18 00:24:38 +00:00
LinkAllAsmWriterComponents.h
LinkAllCodegenComponents.h
LiveInterval.h
LiveIntervalAnalysis.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
LiveIntervalUnion.h
LivePhysRegs.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
LiveRangeEdit.h Remove the TargetMachine forwards for TargetSubtargetInfo based 2014-08-04 21:25:23 +00:00
LiveRegMatrix.h
LiveStackAnalysis.h
LiveVariables.h
MachineBasicBlock.h
MachineBlockFrequencyInfo.h
MachineBranchProbabilityInfo.h
MachineCodeEmitter.h
MachineCodeInfo.h
MachineCombinerPattern.h MachineCombiner Pass for selecting faster instruction 2014-08-03 21:35:39 +00:00
MachineConstantPool.h
MachineDominanceFrontier.h
MachineDominators.h [MachineDominatorTree] Provide a method to inform a MachineDominatorTree that a 2014-08-13 21:00:07 +00:00
MachineFrameInfo.h Make isAliased property for fixed-offset stack objects adjustable 2014-08-16 00:17:02 +00:00
MachineFunction.h Have MachineFunction cache a pointer to the subtarget to make lookups 2014-08-05 02:39:49 +00:00
MachineFunctionAnalysis.h
MachineFunctionPass.h
MachineInstr.h [Cleanup] Utility function to erase instruction and mark DBG_Values 2014-08-13 21:15:23 +00:00
MachineInstrBuilder.h
MachineInstrBundle.h
MachineJumpTableInfo.h
MachineLoopInfo.h
MachineMemOperand.h
MachineModuleInfo.h Delete dead code. NFC. 2014-08-15 14:58:22 +00:00
MachineModuleInfoImpls.h
MachineOperand.h
MachinePassRegistry.h
MachinePostDominators.h
MachineRegionInfo.h
MachineRegisterInfo.h Have MachineRegisterInfo take and store the MachineFunction it 2014-08-12 08:00:56 +00:00
MachineRelocation.h
MachineScheduler.h
MachineSSAUpdater.h
MachineTraceMetrics.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MachineValueType.h
MachORelocation.h
Passes.h MachineCombiner Pass for selecting faster instruction 2014-08-03 21:35:39 +00:00
PseudoSourceValue.h
RegAllocPBQP.h
RegAllocRegistry.h
RegisterClassInfo.h
RegisterPressure.h
RegisterScavenging.h Changed the liveness tracking in the RegisterScavenger 2014-08-04 23:07:49 +00:00
ResourcePriorityQueue.h
RuntimeLibcalls.h
ScheduleDAG.h
ScheduleDAGInstrs.h
ScheduleDFS.h
ScheduleHazardRecognizer.h
SchedulerRegistry.h
ScoreboardHazardRecognizer.h
SelectionDAG.h [PowerPC] Implement PPCTargetLowering::getTgtMemIntrinsic 2014-08-13 01:15:40 +00:00
SelectionDAGISel.h Remove the TargetMachine forwards for TargetSubtargetInfo based 2014-08-04 21:25:23 +00:00
SelectionDAGNodes.h Revert "Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size." 2014-08-18 00:24:38 +00:00
SlotIndexes.h
StackMapLivenessAnalysis.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
StackMaps.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
StackProtector.h
TargetLoweringObjectFileImpl.h
TargetSchedule.h MachineCombiner Pass for selecting faster instruction 2014-08-03 21:35:39 +00:00
ValueTypes.h
ValueTypes.td
VirtRegMap.h