llvm-6502/include/llvm
Evan Cheng 5379f412bc Fix PR3149. If an early clobber def is a physical register and it is tied to an input operand, it effectively extends the live range of the physical register. Currently we do not have a good way to represent this.
172     %ECX<def> = MOV32rr %reg1039<kill>
180     INLINEASM <es:subl $5,$1
        sbbl $3,$0>, 10, %EAX<def>, 14, %ECX<earlyclobber,def>, 9, %EAX<kill>,
36, <fi#0>, 1, %reg0, 0, 9, %ECX<kill>, 36, <fi#1>, 1, %reg0, 0
188     %EAX<def> = MOV32rr %EAX<kill>
196     %ECX<def> = MOV32rr %ECX<kill>
204     %ECX<def> = MOV32rr %ECX<kill>
212     %EAX<def> = MOV32rr %EAX<kill>
220     %EAX<def> = MOV32rr %EAX
228     %reg1039<def> = MOV32rr %ECX<kill>

The early clobber operand ties ECX input to the ECX def.

The live interval of ECX is represented as this:
%reg20,inf = [46,47:1)[174,230:0)  0@174-(230) 1@46-(47)

The right way to represent this is something like
%reg20,inf = [46,47:2)[174,182:1)[181:230:0)  0@174-(182) 1@181-230 @2@46-(47)

Of course that won't work since that means overlapping live ranges defined by two val#.

The workaround for now is to add a bit to val# which says the val# is redefined by a early clobber def somewhere. This prevents the move at 228 from being optimized away by SimpleRegisterCoalescing::AdjustCopiesBackFrom.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61259 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 20:58:01 +00:00
..
ADT Add explicit this-> for some member function in templated base class. 2008-12-13 10:55:13 +00:00
Analysis Today the front-ends (llvm-gcc and clang) generate multiple llvm.dbg.compile_units to identify source file for various debug entities. Each llvm.dbg.compile_unit matches one file on the disk. However, the backend only supports one DW_TAG_compile_unit per .o file. The backend selects first compile_unit from the vector to construct DW_TAG_compile_unit entry, which is not correct in all cases. 2008-12-17 22:39:29 +00:00
Assembly Move Print*Pass to use raw_ostream. 2008-10-22 03:25:22 +00:00
Bitcode Add support for writing LLVM IR to a specified BitstreamWriter. 2008-12-19 18:37:59 +00:00
CodeGen Fix PR3149. If an early clobber def is a physical register and it is tied to an input operand, it effectively extends the live range of the physical register. Currently we do not have a good way to represent this. 2008-12-19 20:58:01 +00:00
CompilerDriver Some enhancements for the 'case' expression. 2008-12-17 02:47:01 +00:00
Config CMake: Remove HAVE_LT_DLOPEN from config.h.cmake because it was 2008-11-18 21:12:01 +00:00
Debugger
ExecutionEngine DisableGVCompilation should not abort on internal GlobalValue's. 2008-12-09 07:31:49 +00:00
Support newline at end of phile 2008-12-09 06:32:32 +00:00
System Update the stub and callback code to handle lazy compilation. The stub 2008-10-20 21:39:23 +00:00
Target Fix bug 3202. 2008-12-19 10:55:56 +00:00
Transforms Factor some code into a new FoldSingleEntryPHINodes method. 2008-12-03 19:44:02 +00:00
AbstractTypeUser.h
Argument.h Large mechanical patch. 2008-09-25 21:00:45 +00:00
Attributes.h Resubmit support for the 'nocapture' attribute. 2008-12-19 06:39:12 +00:00
AutoUpgrade.h
BasicBlock.h fix grammar, thanks Duncan! 2008-12-11 11:44:49 +00:00
CallGraphSCCPass.h
CallingConv.h Add "inreg" field to CallSDNode (doesn't increase 2008-09-26 19:31:26 +00:00
CMakeLists.txt CMake: Adds header and TableGen files to Visual Studio solution. A new 2008-11-15 02:08:08 +00:00
Constant.h fix typo's 2008-10-13 10:28:12 +00:00
Constants.h Make ConstantAggregateZero::get return a ConstantAggregateZero*, 2008-12-08 07:10:54 +00:00
DerivedTypes.h
Function.h Fix disagreement about where the attributes are 2008-10-07 22:33:44 +00:00
GlobalAlias.h
GlobalValue.h Rename isWeakForLinker to mayBeOverridden. Use it 2008-09-29 11:25:42 +00:00
GlobalVariable.h
InlineAsm.h Keep track of *which* input constraint matches an output 2008-10-17 16:47:46 +00:00
InstrTypes.h Use the opcode predicates, instead of duplicating the code. 2008-10-17 21:42:45 +00:00
Instruction.def Cosmetic. 2008-10-06 20:33:02 +00:00
Instruction.h improve const correctness. 2008-11-27 08:39:18 +00:00
Instructions.h add a long-overdue AllocaInst::isStaticAlloca method. 2008-11-26 02:54:17 +00:00
IntrinsicInst.h reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an 2008-11-21 16:42:48 +00:00
Intrinsics.h Large mechanical patch. 2008-09-25 21:00:45 +00:00
Intrinsics.td Add sub/mul overflow intrinsics. This currently doesn't have a 2008-12-09 22:08:41 +00:00
IntrinsicsAlpha.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsARM.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsCellSPU.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsPowerPC.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsX86.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsXCore.td Add XCore intrinsics for getid (returns thread id) and bitrev (reverses 2008-11-14 10:12:16 +00:00
LinkAllPasses.h Add -print-dbginfo pass that prints LLVM IR with comments inserted to show 2008-12-16 09:09:19 +00:00
LinkAllVMCore.h opt was not exporting the Mangler symbols 2008-11-05 22:42:50 +00:00
Linker.h Make comments and code for QuietWarnings and QuietErrors 2008-10-25 17:57:20 +00:00
Module.h - Add a "getOrInsertGlobal" method to the Module class. This acts similarly to 2008-11-04 22:51:24 +00:00
ModuleProvider.h
OperandTraits.h
Pass.h Add an assert to catch user errors like: 2008-10-31 17:27:41 +00:00
PassAnalysisSupport.h
PassManager.h
PassManagers.h Trim #includes. 2008-10-16 20:18:31 +00:00
PassSupport.h
SymbolTableListTraits.h
Type.h add a new form of Type::dump that takes a module for type names, 2008-10-01 20:16:19 +00:00
TypeSymbolTable.h
Use.h Add comment on how tagged pointers are 2008-10-17 08:31:36 +00:00
User.h Do not allow a user to set the operand for a constant. 2008-10-28 17:22:40 +00:00
Value.h Comment typeo fix, thanks Duncan! 2008-12-02 18:33:11 +00:00
ValueSymbolTable.h