diff options
| author | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2010-09-13 18:15:37 +0000 | 
|---|---|---|
| committer | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2010-09-13 18:15:37 +0000 | 
| commit | 1094c80281e3cdd9e9a9d7ee716da6386b33359b (patch) | |
| tree | 261a9b5c2d57c93bc3f22d86b04100b2ccd9eb9d /llvm/lib/Transforms/Utils | |
| parent | 80e85e72b6ebc930f8275f3c5b0e543e98469757 (diff) | |
| download | bcm5719-llvm-1094c80281e3cdd9e9a9d7ee716da6386b33359b.tar.gz bcm5719-llvm-1094c80281e3cdd9e9a9d7ee716da6386b33359b.zip  | |
Added skeleton for inline asm multiple alternative constraint support.
llvm-svn: 113766
Diffstat (limited to 'llvm/lib/Transforms/Utils')
| -rw-r--r-- | llvm/lib/Transforms/Utils/AddrModeMatcher.cpp | 26 | 
1 files changed, 5 insertions, 21 deletions
diff --git a/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp b/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp index 4d64c8578ef..b803521e871 100644 --- a/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp +++ b/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp @@ -21,6 +21,7 @@  #include "llvm/Support/GetElementPtrTypeIterator.h"  #include "llvm/Support/PatternMatch.h"  #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/CallSite.h"  using namespace llvm;  using namespace llvm::PatternMatch; @@ -379,27 +380,10 @@ bool AddressingModeMatcher::MatchAddr(Value *Addr, unsigned Depth) {  /// return false.  static bool IsOperandAMemoryOperand(CallInst *CI, InlineAsm *IA, Value *OpVal,                                      const TargetLowering &TLI) { -  std::vector<InlineAsm::ConstraintInfo> -  Constraints = IA->ParseConstraints(); - -  unsigned ArgNo = 0;   // The argument of the CallInst. -  for (unsigned i = 0, e = Constraints.size(); i != e; ++i) { -    TargetLowering::AsmOperandInfo OpInfo(Constraints[i]); - -    // Compute the value type for each operand. -    switch (OpInfo.Type) { -      case InlineAsm::isOutput: -        if (OpInfo.isIndirect) -          OpInfo.CallOperandVal = CI->getArgOperand(ArgNo++); -        break; -      case InlineAsm::isInput: -        OpInfo.CallOperandVal = CI->getArgOperand(ArgNo++); -        break; -      case InlineAsm::isClobber: -        // Nothing to do. -        break; -    } - +  std::vector<TargetLowering::AsmOperandInfo> TargetConstraints = TLI.ParseConstraints(ImmutableCallSite(CI)); +  for (unsigned i = 0, e = TargetConstraints.size(); i != e; ++i) { +    TargetLowering::AsmOperandInfo &OpInfo = TargetConstraints[i]; +          // Compute the constraint code and ConstraintType to use.      TLI.ComputeConstraintToUse(OpInfo, SDValue());  | 

