aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Simplify ".bc" detection.Benjamin Kramer2010-04-151-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101365 91177308-0d34-0410-b5e6-96231b3b80d8
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-1543-587/+578
| | | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance the load/store narrowing optimization to handle aChris Lattner2010-04-152-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tokenfactor in between the load/store. This allows us to optimize test7 into: _test7: ## @test7 ## BB#0: ## %entry movl (%rdx), %eax ## kill: SIL<def> ESI<kill> movb %sil, 5(%rdi) ret instead of: _test7: ## @test7 ## BB#0: ## %entry movl 4(%esp), %ecx movl $-65281, %eax ## imm = 0xFFFFFFFFFFFF00FF andl 4(%ecx), %eax movzbl 8(%esp), %edx shll $8, %edx addl %eax, %edx movl 12(%esp), %eax movl (%eax), %eax movl %edx, 4(%ecx) ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101355 91177308-0d34-0410-b5e6-96231b3b80d8
* teach codegen to turn trunc(zextload) into load when possible.Chris Lattner2010-04-152-14/+40
| | | | | | | | | This doesn't occur much at all, it only seems to formed in the case when the trunc optimization kicks in due to phase ordering. In that case it is saves a few bytes on x86-32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101350 91177308-0d34-0410-b5e6-96231b3b80d8
* add a simple dag combine to replace trivial shl+lshr withChris Lattner2010-04-152-1/+10
| | | | | | | and. This happens with the store->load narrowing stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101348 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement rdar://7860110 (also in target/readme.txt) narrowingChris Lattner2010-04-153-35/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a load/or/and/store sequence into a narrower store when it is safe. Daniel tells me that clang will start producing this sort of thing with bitfields, and this does trigger a few dozen times on 176.gcc produced by llvm-gcc even now. This compiles code like CodeGen/X86/2009-05-28-DAGCombineCrash.ll into: movl %eax, 36(%rdi) instead of: movl $4294967295, %eax ## imm = 0xFFFFFFFF andq 32(%rdi), %rax shlq $32, %rcx addq %rax, %rcx movq %rcx, 32(%rdi) and each of the testcases into a single store. Each of them used to compile into craziness like this: _test4: movl $65535, %eax ## imm = 0xFFFF andl (%rdi), %eax shll $16, %esi addl %eax, %esi movl %esi, (%rdi) ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101343 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more const qualifiers for LLVM IR pointers in CodeGen.Dan Gohman2010-04-159-28/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101342 91177308-0d34-0410-b5e6-96231b3b80d8
* further tweak this to do something useful.Chris Lattner2010-04-151-6/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101341 91177308-0d34-0410-b5e6-96231b3b80d8
* remove undef control flow.Chris Lattner2010-04-151-22/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101340 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary uses of <iostream>.Daniel Dunbar2010-04-153-7/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101338 91177308-0d34-0410-b5e6-96231b3b80d8
* tests: MC/Disassembler tests depend on ARM support being compiler in.Daniel Dunbar2010-04-151-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101337 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a crash on "lli ex" or any other file whose name is exactly twoChris Lattner2010-04-151-1/+2
| | | | | | | characters long. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101336 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build.Anders Carlsson2010-04-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101335 91177308-0d34-0410-b5e6-96231b3b80d8
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-1564-565/+585
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101334 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow lowering for palignr instructions for mmx sized vectors. AddEric Christopher2010-04-152-3/+23
| | | | | | | patterns to handle the lowering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101331 91177308-0d34-0410-b5e6-96231b3b80d8
* More 80 violations.Evan Cheng2010-04-155-29/+54
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101330 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap the error msgs in DEBUG() macro so that they won't appear in NDEBUG build.Johnny Chen2010-04-152-4/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101329 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 col violations.Evan Cheng2010-04-151-8/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101325 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comment.Devang Patel2010-04-151-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101317 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no need to track compile unit offsets if there is only one compile ↵Devang Patel2010-04-142-6/+0
| | | | | | unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101315 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Devang Patel2010-04-141-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101314 91177308-0d34-0410-b5e6-96231b3b80d8
* IPO needs ScalarOpts and InstCombine in its libsTobias Grosser2010-04-141-0/+2
| | | | | | | | The commit "Adding IPSCCP and Internalize passes to the C-bindings" introduced new dependencies for IPO. Add these to the CMAKE build as otherwise the BUILD_SHARED_LIBS=1 build fails. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101313 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed another assert exposed by fuzzing. Now, the DisassembleVFPLdStMulFrm()Johnny Chen2010-04-141-0/+6
| | | | | | | | function checks whether we have a valid submode for VLDM/VSTM (must be either "ia" or "db") before calling ARM_AM::getAM5Opc(AMSubMode, unsigned char). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101306 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -arm-long-calls option to force calls to be indirect. This makes theJim Grosbach2010-04-141-2/+44
| | | | | | | | | | kernel linker happier when dealing with kexts. Radar 7805069 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101303 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix TrackingVH to handle const Value subclasses.Dan Gohman2010-04-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101300 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a const here. This makes this function consistent with all theDan Gohman2010-04-141-2/+1
| | | | | | | | other getOperand wrappers, and it makes it easier to use with DebugInfo code, which isn't currently prepared to see const MDNode *. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101299 91177308-0d34-0410-b5e6-96231b3b80d8
* Constify GetConstantStringInfo.Dan Gohman2010-04-142-13/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101298 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use DILocation when processing a DebugLoc.Nicolas Geoffray2010-04-141-8/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101294 91177308-0d34-0410-b5e6-96231b3b80d8
* For t2BFI disassembly, apply the same error checking as in r101205.Johnny Chen2010-04-142-3/+6
| | | | | | Change the error msg to read "Encoding error: msb < lsb". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101293 91177308-0d34-0410-b5e6-96231b3b80d8
* Move a bunch of methods from CallSite to CallSiteBase, so that they canDan Gohman2010-04-142-118/+95
| | | | | | | be used in ImmutableCallSite too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101292 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed another assert exposed by fuzzing. The utility function getRegisterEnum()Johnny Chen2010-04-144-319/+352
| | | | | | | | | | | | | | | was asserting because the (RegClass, RegNum) combination doesn't make sense from an encoding point of view. Since getRegisterEnum() is used all over the place, to change the code to check for encoding error after each call would not only bloat the code, but also make it less readable. An Err flag is added to the ARMBasicMCBuilder where a client can set a non-zero value to indicate some kind of error condition while building up the MCInst. ARMBasicMCBuilder::BuildIt() checks this flag and returns false if a non-zero value is detected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101290 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded types from test.Jakob Stoklund Olesen2010-04-141-69/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101286 91177308-0d34-0410-b5e6-96231b3b80d8
* - Code clean up to reduce indentation.Evan Cheng2010-04-141-51/+54
| | | | | | | - TryToOptimizeStoreOfMallocToGlobal should check if TargetData is available and bail out if it is not. The transformations being done requires TD. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101285 91177308-0d34-0410-b5e6-96231b3b80d8
* Use FunTy instead of hard-coding Function.Dan Gohman2010-04-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101283 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't custom lower bit converts to ARM VMOVDRRD or VMOVDRR when the operandBob Wilson2010-04-142-9/+32
| | | | | | | | does not have a legal type. The legalizer does not know how to handle those nodes. Radar 7854640. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101282 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, make these public.Dan Gohman2010-04-141-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101280 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getType() and getCaller() into CallSiteBase so thatDan Gohman2010-04-141-8/+8
| | | | | | | ImmutableCallSite can use them too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101279 91177308-0d34-0410-b5e6-96231b3b80d8
* Trim tests and convert to FileCheck.Evan Cheng2010-04-142-48/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101277 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete unneeeded arguments.Dan Gohman2010-04-143-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101276 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete unused arguments.Dan Gohman2010-04-142-8/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101275 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out EH landing pad code into a separate function, and constifyDan Gohman2010-04-1410-60/+70
| | | | | | | a bunch of stuff to support it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101273 91177308-0d34-0410-b5e6-96231b3b80d8
* Reset the debug location even if the instruction was a terminator.Dan Gohman2010-04-141-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101272 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a missing #include.Dan Gohman2010-04-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101270 91177308-0d34-0410-b5e6-96231b3b80d8
* Refine #includes.Dan Gohman2010-04-142-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101269 91177308-0d34-0410-b5e6-96231b3b80d8
* Split ISD::NodeType and a few related items out of SelectionDAGNodes.hDan Gohman2010-04-142-741/+764
| | | | | | | | into a separate header to allow clients to use them without pulling in SelectionDAG-specific declarations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101268 91177308-0d34-0410-b5e6-96231b3b80d8
* Pull utility routines with no SelectionDAG dependence out ofDan Gohman2010-04-143-76/+95
| | | | | | | | SelectionDAGBuilder. FunctionLoweringInfo isn't an ideal place for them to live, but it's better than SelectionDAGBuilder for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101267 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos in comments.Dan Gohman2010-04-142-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101266 91177308-0d34-0410-b5e6-96231b3b80d8
* performance: cache the dereferenced use_iteratorGabor Greif2010-04-141-7/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101265 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete an obsolete comment.Dan Gohman2010-04-141-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101264 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete an unused function.Dan Gohman2010-04-142-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101263 91177308-0d34-0410-b5e6-96231b3b80d8