summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Move some those Xor simplifications which don't require creating newDuncan Sands2010-11-172-61/+80
| | | | | | | | instructions out of InstCombine and into InstructionSimplify. While there, introduce an m_AllOnes pattern to simplify matching with integers and vectors with all bits equal to one. llvm-svn: 119536
* More ARM encoding bits. LDRH now encodes properly.Jim Grosbach2010-11-172-30/+47
| | | | llvm-svn: 119529
* Add support for .int.Rafael Espindola2010-11-171-0/+2
| | | | llvm-svn: 119512
* Add support for .2byte, .4byte and .8byte.Rafael Espindola2010-11-171-0/+6
| | | | | | Fixes PR8631. llvm-svn: 119511
* MC-JIT: Stub out "pure" streamer.Daniel Dunbar2010-11-172-0/+260
| | | | | | - No immediate use, but maybe someone feels like hacking on it. llvm-svn: 119510
* MCJIT: Stub out MCJIT implementation, still doesn't do anything useful.Daniel Dunbar2010-11-176-1/+269
| | | | llvm-svn: 119509
* lli: Add stub -use-mcjit option, which doesn't currently do anything.Daniel Dunbar2010-11-171-1/+17
| | | | llvm-svn: 119508
* Have InlineFunction use SimplifyInstruction rather thanDuncan Sands2010-11-171-9/+11
| | | | | | | | | hasConstantValue. I was leery of using SimplifyInstruction while the IR was still in a half-baked state, which is the reason for delaying the simplification until the IR is fully cooked. llvm-svn: 119494
* Now that hasConstantValue has been made simpler, it may return theDuncan Sands2010-11-172-5/+7
| | | | | | | phi node itself if it occurs in an unreachable basic block. Protect against this. Hopefully this will fix some more buildbots. llvm-svn: 119493
* Revert r119109 for now. It's breaking 176.gcc.Evan Cheng2010-11-171-17/+0
| | | | llvm-svn: 119492
* Previously SimplifyInstruction could report that an instructionDuncan Sands2010-11-172-17/+32
| | | | | | | | simplified to itself (this can only happen in unreachable blocks). Change it to return null instead. Hopefully this will fix some buildbot failures. llvm-svn: 119490
* With the newly simplified SourceMgr interfaces and the generalizedChris Lattner2010-11-171-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SrcMgrDiagHandler, we can improve clang diagnostics for inline asm: instead of reporting them on a source line of the original line, we can report it on the correct line wherever the string literal came from. For something like this: void foo() { asm("push %rax\n" ".code32\n"); } we used to get this: (note that the line in t.c isn't helpful) t.c:4:7: error: warning: ignoring directive for now asm("push %rax\n" ^ <inline asm>:2:1: note: instantiated into assembly here .code32 ^ now we get: t.c:5:8: error: warning: ignoring directive for now ".code32\n" ^ <inline asm>:2:1: note: instantiated into assembly here .code32 ^ Note that we're pointing to line 5 properly now. llvm-svn: 119488
* now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate theChris Lattner2010-11-174-17/+14
| | | | | | | | cookie argument to the SourceMgr diagnostic stuff. This cleanly separates LLVMContext's inlineasm handler from the sourcemgr error handling definition, increasing type safety and cleaning things up. llvm-svn: 119486
* Add simple arithmetics and %type directive for PTXChe-Liang Chiou2010-11-172-9/+51
| | | | llvm-svn: 119485
* Simplify code that toggle optional operand to ARM::CPSR.Evan Cheng2010-11-171-3/+3
| | | | llvm-svn: 119484
* rearrange how the handler in SourceMgr is installed, eliminating the use of Chris Lattner2010-11-171-8/+35
| | | | | | the cookie argument to setDiagHandler llvm-svn: 119483
* refactor the interface to EmitInlineAsm a bit, no functionality change.Chris Lattner2010-11-172-11/+18
| | | | llvm-svn: 119482
* fix PR8613 - Copy constructor of SwitchInst does not call SwitchInst::initChris Lattner2010-11-171-8/+9
| | | | llvm-svn: 119463
* tidy upChris Lattner2010-11-172-26/+16
| | | | llvm-svn: 119462
* The machine instruction no longer encodes the submode as a separate operand. WeBill Wendling2010-11-173-6/+14
| | | | | | should get the submode from the load/store multiple instruction's opcode. llvm-svn: 119461
* Proper encoding for VLDM and VSTM instructions. The register lists for theseBill Wendling2010-11-173-11/+57
| | | | | | | | | instructions have to distinguish between lists of single- and double-precision registers in order for the ASM matcher to do a proper job. In all other respects, a list of single- or double-precision registers are the same as a list of GPR registers. llvm-svn: 119460
* Fix a layering violation: hasConstantValue, which is part of the PHINodeDuncan Sands2010-11-173-61/+46
| | | | | | | | | | | | | | class, uses DominatorTree which is an analysis. This change moves all of the tricky hasConstantValue logic to SimplifyInstruction, and replaces it with a very simple literal implementation. I already taught users of hasConstantValue that need tricky stuff to use SimplifyInstruction instead. I didn't update InlineFunction because the IR looks like it might be in a funky state at the point it calls hasConstantValue, which makes calling SimplifyInstruction dangerous since it can in theory do a lot of tricky reasoning. This may be a pessimization, for example in the case where all phi node operands are either undef or a fixed constant. llvm-svn: 119459
* Have ScalarEvolution use SimplifyInstruction rather than hasConstantValue.Duncan Sands2010-11-171-1/+5
| | | | | | While there, add a note about an inefficiency I noticed. llvm-svn: 119458
* Have RemovePredecessorAndSimplify you SimplifyInstructionDuncan Sands2010-11-171-4/+4
| | | | | | rather than hasConstantValue. llvm-svn: 119457
* Remove dead code in GVN: now that SimplifyInstruction is calledDuncan Sands2010-11-171-43/+2
| | | | | | | | | | systematically, CollapsePhi will always return null here. Note that CollapsePhi did an extra check, isSafeReplacement, which the SimplifyInstruction logic does not do. I think that check was bogus - I guess we will soon find out! (It was originally added in commit 41998 without a testcase). llvm-svn: 119456
* Memoize results from ScalarEvolution's getUnsignedRange and getSignedRange.Dan Gohman2010-11-171-43/+80
| | | | | | This fixes some extreme compile times on unrolled sha512 code. llvm-svn: 119455
* Only avoid the check if we're the last operand before the variableEric Christopher2010-11-171-3/+3
| | | | | | operands in a variadic instruction. llvm-svn: 119446
* Add binary emission stuff for VLDM/VSTM. This reuses theBill Wendling2010-11-172-6/+49
| | | | | | | "getRegisterListOpValue" logic. If the registers are double or single precision, the value returned is suitable for VLDM/VSTM. llvm-svn: 119435
* Fix typo: Exectuable -> ExecutablePeter Collingbourne2010-11-172-2/+2
| | | | llvm-svn: 119433
* Use the correct variable names so that the encodings will be correct.Bill Wendling2010-11-162-4/+4
| | | | llvm-svn: 119403
* Reapply r118917. With pseudo-instruction expansion moved toDan Gohman2010-11-161-5/+5
| | | | | | | a different pass, the complicated interaction between cmov expansion and fast isel is no longer a concern. llvm-svn: 119400
* Fix assembling X86CompilationCallback_Win64.asm on VS 10.Oscar Fuentes2010-11-161-2/+2
| | | | | | Patch by Louis Zhuang! llvm-svn: 119394
* Fix grammaro.Dan Gohman2010-11-161-1/+1
| | | | llvm-svn: 119386
* Add ExpandPseudos.cpp.Evan Cheng2010-11-161-0/+1
| | | | llvm-svn: 119385
* Add .loc methods to the streamer.Rafael Espindola2010-11-1611-26/+77
| | | | | | | Next: Add support for the !HasDotLocAndDotFile case to the MCAsmStreamer and then switch codegen to use it. llvm-svn: 119384
* Split pseudo-instruction expansion into a separate pass, to make itDan Gohman2010-11-163-13/+87
| | | | | | | easier to debug, and to avoid complications when the CFG changes in the middle of the instruction selection process. llvm-svn: 119382
* Fix emergency spilling in LiveIntervals::spillPhysRegAroundRegDefsUses.Jakob Stoklund Olesen2010-11-161-22/+23
| | | | | | | | | | | | | | Always spill the full representative register at any point where any subregister is live. This fixes PR8620 which caused the old logic to get confused and not spill anything at all. The fundamental problem here is that the coalescer is too aggressive about physical register coalescing. It sometimes makes it impossible to allocate registers without these emergency spills. llvm-svn: 119375
* Print out the register class of the current interval.Jakob Stoklund Olesen2010-11-161-2/+3
| | | | llvm-svn: 119374
* Parse and ignore some .cfi_* directives.Rafael Espindola2010-11-161-0/+95
| | | | llvm-svn: 119362
* This is the first step in adding sane error handling support to LLVMSystem.Michael J. Spencer2010-11-164-0/+298
| | | | | | | | | | | | | | | | | The system API's will be shifted over to returning an error_code, and returning other return values as out parameters to the function. Code that needs to check error conditions will use the errc enum values which are the same as the posix_errno defines (EBADF, E2BIG, etc...), and are compatable with the error codes in WinError.h due to some magic in system_error. An example would be: if (error_code ec = KillEvil("Java")) { // error_code can be converted to bool. handle_error(ec); } llvm-svn: 119360
* ARM conditional mov encoding fix.Jim Grosbach2010-11-161-2/+1
| | | | llvm-svn: 119354
* Have a few places that want to simplify phi nodes use SimplifyInstructionDuncan Sands2010-11-165-13/+18
| | | | | | rather than calling hasConstantValue. No intended functionality change. llvm-svn: 119352
* In which I discover the existence of loops. Threading an operationDuncan Sands2010-11-162-62/+104
| | | | | | | | | | | over a phi node by applying it to each operand may be wrong if the operation and the phi node are mutually interdependent (the testcase has a simple example of this). So only do this transform if it would be correct to perform the operation in each predecessor of the block containing the phi, i.e. if the other operands all dominate the phi. This should fix the FFMPEG snow.c regression reported by İsmail Dönmez. llvm-svn: 119347
* A bit more of gnu as compatibility when handling relocations with aliases.Rafael Espindola2010-11-161-2/+5
| | | | llvm-svn: 119328
* L_bit doesn't work here.Bill Wendling2010-11-161-1/+1
| | | | llvm-svn: 119325
* - Remove dead patterns.Bill Wendling2010-11-163-43/+19
| | | | | | - Add encodings to the *LDMIA_RET instrs. Probably not needed... llvm-svn: 119323
* vldm and vstm are mnemonics for vldmia and vstmia resp.Bill Wendling2010-11-161-0/+3
| | | | llvm-svn: 119321
* Make the verifier a little quieter on instructions that it's probablyEric Christopher2010-11-161-1/+3
| | | | | | (and likely) wrong about anyhow. llvm-svn: 119320
* Fix a bug I introduced in the ppc refactoring, which caused longChris Lattner2010-11-161-0/+1
| | | | | | | | | | branches to be emitted as: bne cr0, 2 instead of: bne cr0, $+8 llvm-svn: 119317
* Encode the multi-load/store instructions with their respective modes ('ia',Bill Wendling2010-11-1612-536/+562
| | | | | | | | | 'db', 'ib', 'da') instead of having that mode as a separate field in the instruction. It's more convenient for the asm parser and much more readable for humans. <rdar://problem/8654088> llvm-svn: 119310
OpenPOWER on IntegriCloud