llvm-6502/include/llvm
Chris Lattner 5a09690446 Implement a signficant optimization for inline asm:
When choosing between constraints with multiple options,
like "ir", test to see if we can use the 'i' constraint and
go with that if possible.  This produces more optimal ASM in
all cases (sparing a register and an instruction to load it),
and fixes inline asm like this:

void test () {
  asm volatile (" %c0 %1 " : : "imr" (42), "imr"(14));
}

Previously we would dump "42" into a memory location (which
is ok for the 'm' constraint) which would cause a problem
because the 'c' modifier is not valid on memory operands.

Isn't it great how inline asm turns 'missed optimization'
into 'compile failed'??

Incidentally, this was the todo in 
PowerPC/2007-04-24-InlineAsm-I-Modifier.ll

Please do NOT pull this into Tak.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50315 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-27 00:37:18 +00:00
..
ADT Implement != for DenseSet iterators. 2008-04-24 23:49:45 +00:00
Analysis Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989 2008-04-25 16:53:59 +00:00
Assembly Fix newly-introduced 4.3 warnings 2008-02-20 12:07:57 +00:00
Bitcode Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989 2008-04-25 16:53:59 +00:00
CodeGen - Check if a register is livein before removing it. It may have already been removed. 2008-04-24 09:06:33 +00:00
Config Use C-style comments :) 2008-03-23 13:44:17 +00:00
Debugger rewrite SourceFile to be in terms of MemoryBuffer, not MappedFile. 2008-04-01 03:59:34 +00:00
ExecutionEngine Cosmetic changes, as suggested by Evan. No functionality changes. 2008-04-20 17:44:19 +00:00
Support Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989 2008-04-25 16:53:59 +00:00
System Add "empty()" method to sys::Path and remove unnecessary whitespace. 2008-04-16 18:27:02 +00:00
Target Implement a signficant optimization for inline asm: 2008-04-27 00:37:18 +00:00
Transforms Move SplitBlockPredecessors out of loopsimplify into BasicBlockUtils.h 2008-04-21 01:28:02 +00:00
AbstractTypeUser.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Argument.h Add a predicate to Argument to check for the StructRet attribute. 2008-02-17 23:22:28 +00:00
AutoUpgrade.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
BasicBlock.h Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989 2008-04-25 16:53:59 +00:00
CallGraphSCCPass.h PassInfo keep tracks whether a pass is an analysis pass or not. 2008-03-19 21:56:59 +00:00
CallingConv.h Implement sseregparm. 2008-02-05 20:46:33 +00:00
Constant.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Constants.h ConstantFP::get should be static. 2008-04-09 17:16:28 +00:00
DerivedTypes.h Enforce that multiple return values have to have at least one result. 2008-04-23 05:36:34 +00:00
Function.h Convenience method for setting the nounwind 2008-04-08 07:23:58 +00:00
GlobalAlias.h API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
GlobalValue.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
GlobalVariable.h API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
InlineAsm.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
InstrTypes.h API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
Instruction.def Add GetResultInst. First step for multiple return value support. 2008-02-19 22:15:16 +00:00
Instruction.h add a handy helper method to instruction, useful for determining 2008-04-20 22:11:30 +00:00
Instructions.h API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
IntrinsicInst.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Intrinsics.h Reimplement the parameter attributes support, phase #1. hilights: 2008-03-12 17:45:29 +00:00
Intrinsics.td Fix 80 column violations. 2008-03-04 03:19:19 +00:00
IntrinsicsARM.td remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
IntrinsicsCellSPU.td Final de-tabification. 2008-02-27 06:33:05 +00:00
IntrinsicsPowerPC.td remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
IntrinsicsX86.td Undo 48570. Correctly match mmx shift instructions with an immediate operand. 2008-03-21 00:40:09 +00:00
LinkAllPasses.h Add a new Jump Threading pass, which will handle cases 2008-04-20 20:35:01 +00:00
LinkAllVMCore.h prune unneeded #includes 2008-04-01 04:00:45 +00:00
Linker.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
LinkTimeOptimizer.h And final pack of warnings silencing 2008-02-20 11:27:04 +00:00
Module.h Fix comment. 2008-04-16 20:45:31 +00:00
ModuleProvider.h Add explicit keywords. 2008-03-25 22:06:05 +00:00
ParameterAttributes.h Various improvements suggested by Duncan 2008-03-13 04:33:03 +00:00
Pass.h Don't include <map> in Pass.h, which doesn't need it. This requires 2008-03-21 23:51:57 +00:00
PassAnalysisSupport.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
PassManager.h Give PassManager and FunctionPassManager a common base class, with 2008-03-11 16:41:42 +00:00
PassManagers.h Don't include <map> in Pass.h, which doesn't need it. This requires 2008-03-21 23:51:57 +00:00
PassSupport.h PassInfo keep tracks whether a pass is an analysis pass or not. 2008-03-19 21:56:59 +00:00
SymbolTableListTraits.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Type.h add an assertion to catch a null PATypeHolder, patch by Erick Tryzelaar 2008-02-25 21:28:46 +00:00
TypeSymbolTable.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Use.h Fix a copy+paste error in a comment. 2008-04-16 21:57:29 +00:00
User.h API changes for class Use size reduction, wave 1. 2008-04-06 20:25:17 +00:00
Value.h move the Use destructor where it belongs to 2008-03-14 22:03:02 +00:00
ValueSymbolTable.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00