aboutsummaryrefslogtreecommitdiffstats
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* Split SelectionDAGISel::IsLegalAndProfitableToFold toEvan Cheng2010-02-151-4/+6
| | | | | | | | | IsLegalToFold and IsProfitableToFold. The generic version of the later simply checks whether the folding candidate has a single use. This allows the target isel routines more flexibility in deciding whether folding makes sense. The specific case we are interested in is folding constant pool loads with multiple uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96255 91177308-0d34-0410-b5e6-96231b3b80d8
* Check in the first big step of rewriting DAGISelEmitter to Chris Lattner2010-02-156-2/+1001
| | | | | | | | | | | | | | | | | | | | | produce a table based matcher instead of gobs of C++ Code. Though it's not done yet, the shrinkage seems promising, the table for the X86 ISel is 75K and still has a lot of optimization to come (compare to the ~1.5M of .o generated the old way, much of which will go away). The code is currently disabled by default (the #if 0 in DAGISelEmitter.cpp). When enabled it generates a dead SelectCode2 function in the DAGISel Header which will eventually replace SelectCode. There is still a lot of stuff left to do, which are documented with a trail of FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96215 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r96130 ("Forward parameter options as '-option=param'").Mikhail Glushenkov2010-02-151-2/+2
| | | | | | This behaviour must be configurable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96210 91177308-0d34-0410-b5e6-96231b3b80d8
* constizeChris Lattner2010-02-142-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96199 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up a bunch of code, move some random predicatesChris Lattner2010-02-143-101/+110
| | | | | | | on TreePatternNode to be methods on TreePatternNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96197 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the DisablePatternForFastISel predicate, which is a checkChris Lattner2010-02-141-24/+3
| | | | | | | | | that predated -fast-isel which attempted to speed up the dag pattern matchers at -O0. Since fast-isel is around, this is basically obsolete and removing it shrinks the generated dag isels. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96188 91177308-0d34-0410-b5e6-96231b3b80d8
* add an insertion operator.Chris Lattner2010-02-141-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96187 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy upChris Lattner2010-02-141-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96186 91177308-0d34-0410-b5e6-96231b3b80d8
* Forward parameter options as '-option=parameter'.Mikhail Glushenkov2010-02-131-2/+2
| | | | | | | Some tools do not like the '-option parameter' form. Should this be configurable? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96130 91177308-0d34-0410-b5e6-96231b3b80d8
* pull a bunch of huge inline methods in the PatternCodeEmitter Chris Lattner2010-02-131-866/+890
| | | | | | | class out of line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96113 91177308-0d34-0410-b5e6-96231b3b80d8
* Added the rdtscp instruction to the x86 instructionSean Callanan2010-02-131-1/+2
| | | | | | | tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96073 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed encodings for invlpg, invept, and invvpid.Sean Callanan2010-02-131-32/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96065 91177308-0d34-0410-b5e6-96231b3b80d8
* remove special cases for vmlaunch, vmresume, vmxoff, and swapgsChris Lattner2010-02-131-8/+8
| | | | | | | fix swapgs to be spelled right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96058 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove special cases for [LM]FENCE, MONITOR and MWAIT fromChris Lattner2010-02-121-3/+0
| | | | | | | encoder and decoder by using new MRM_ forms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96048 91177308-0d34-0410-b5e6-96231b3b80d8
* Reworked the Intel disassembler to support instructionsSean Callanan2010-02-121-17/+51
| | | | | | | | | | | | | whose opcodes extend into the ModR/M field using the Form field of the instruction rather than by special casing each instruction. Commented out the special casing of VMCALL, which is the first instruction to use this special form. While I was in the neighborhood, added a few comments for people modifying the Intel disassembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96043 91177308-0d34-0410-b5e6-96231b3b80d8
* add a bunch of mod/rm encoding types for fixed mod/rm bytes.Chris Lattner2010-02-121-2/+3
| | | | | | | | This will work better for the disassembler for modeling things like lfence/monitor/vmcall etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95960 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Fix bug where trailing tied operands were forgotten; the X86 assemblerDaniel Dunbar2010-02-121-19/+43
| | | | | | | | | matcher is now free of implicit operands! - Still need to clean up the code now that we don't to worry about implicit operands, and to make it a hard error if an instruction fails to specify all of its operands for some reason. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95956 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance llvm-mc -show-inst to print the enum of an instruction, like so:Chris Lattner2010-02-112-0/+45
| | | | | | | | | | | | testb %al, %al ## <MCInst #2412 TEST8rr ## <MCOperand Reg:2> ## <MCOperand Reg:2>> jne LBB1_7 ## <MCInst #938 JNE_1 ## <MCOperand Expr:(LBB1_7)>> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95935 91177308-0d34-0410-b5e6-96231b3b80d8
* work around a gcc bug with -Wuninitialized.Chris Lattner2010-02-101-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95808 91177308-0d34-0410-b5e6-96231b3b80d8
* lit: Ignore dot files when scanning for tests (e.g., editor temprary files,Daniel Dunbar2010-02-101-1/+6
| | | | | | etc.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95803 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/AsmMatcher: Tweak conversion function name.Daniel Dunbar2010-02-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95802 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/AsmMatcher: Add support for creating tied operands when constructing MCInsts.Daniel Dunbar2010-02-101-9/+67
| | | | | | | - Pretty messy, but we need to rework how we handle tied operands in MCInst anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95774 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove stray DOS newline.Daniel Dunbar2010-02-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95765 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated the enhanced disassembly library's TableGenSean Callanan2010-02-101-8/+1
| | | | | | | | backend to not use exceptions at all except in cases of actual error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95762 91177308-0d34-0410-b5e6-96231b3b80d8
* Updated the TableGen emitter for the EnhancedSean Callanan2010-02-101-209/+24
| | | | | | | | Disassembler to take advantage of the refactored AsmWriterInst.h. Note removed parser code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95760 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed AsmWriterOperand to also include the index of theSean Callanan2010-02-102-4/+15
| | | | | | | | operand into the CodeGenInstruction's list of operands, which is useful for EDEmitter. (Still working on PR6219) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95759 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new CodeGenInstruction::ConstraintInfo classChris Lattner2010-02-104-25/+57
| | | | | | | | | | for representing constraint info semantically instead of as a c expression that will be blatted out to the .inc file. Fix X86RecognizableInstr to use this instead of parsing C code :). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95753 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed some indentation in the AsmWriterInstSean Callanan2010-02-094-14/+22
| | | | | | | | | implementation. Also changed the constructor so that it does not require a Record, making it usable by the EDEmitter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95715 91177308-0d34-0410-b5e6-96231b3b80d8
* Added AsmWriterInst.cpp to the CMakeList so thatSean Callanan2010-02-091-0/+1
| | | | | | | it builds OK on Visual Studio. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95702 91177308-0d34-0410-b5e6-96231b3b80d8
* Per PR 6219, factored AsmWriterInst and AsmWriterOperandSean Callanan2010-02-093-325/+364
| | | | | | | | | | out of the AsmWriterEmitter. This patch does the physical code movement, but leaves the implementation unchanged. I'll make any changes necessary to generalize the code in a separate patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95697 91177308-0d34-0410-b5e6-96231b3b80d8
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-093-9/+9
| | | | | | | | | | into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95687 91177308-0d34-0410-b5e6-96231b3b80d8
* pass stringref by value instead of by const&Chris Lattner2010-02-091-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95627 91177308-0d34-0410-b5e6-96231b3b80d8
* Reintroduce the InlineHint function attribute.Jakob Stoklund Olesen2010-02-062-1/+2
| | | | | | | | | | | | This time it's for real! I am going to hook this up in the frontends as well. The inliner has some experimental heuristics for dealing with the inline hint. When given a -respect-inlinehint option, functions marked with the inline keyword are given a threshold just above the default for -O3. We need some experiments to determine if that is the right thing to do. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95466 91177308-0d34-0410-b5e6-96231b3b80d8
* Make lit's gtest support honor config.environment.Jeffrey Yasskin2010-02-052-8/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95398 91177308-0d34-0410-b5e6-96231b3b80d8
* New flag for GenLibDeps, and llvm-config-perobjincl.Torok Edwin2010-02-041-1/+142
| | | | | | | | This allows to show the explicit files that need to be built/linked to get an LLVM component. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95300 91177308-0d34-0410-b5e6-96231b3b80d8
* sink handling of target-independent machine instrs (otherChris Lattner2010-02-031-18/+0
| | | | | | | | | | | than DEBUG_VALUE :( ) into the target indep AsmPrinter.cpp file. This allows elimination of the NO_ASM_WRITER_BOILERPLATE hack among other things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95177 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmMatcherEmitter: Use stable_sort when reordering instructions, so that orderDaniel Dunbar2010-02-021-3/+5
| | | | | | | is still deterministic even amongst ambiguous instructions (eventually ambiguous match orders will be a hard error, but we aren't there yet). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95157 91177308-0d34-0410-b5e6-96231b3b80d8
* AsmMatcher: Create operand classes before use, apparently records aren't visitedDaniel Dunbar2010-01-301-1/+7
| | | | | | in the order they were declared. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94868 91177308-0d34-0410-b5e6-96231b3b80d8
* FileCheck: When looking for "possible matches", only compare against the prefixDaniel Dunbar2010-01-301-1/+4
| | | | | | | line. Turns out edit_distance can be slow if the string we are scanning for happens to be quite large. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94860 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code cleanup.Dan Gohman2010-01-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94848 91177308-0d34-0410-b5e6-96231b3b80d8
* Skip whitespace when looking for a potential intended match.Dan Gohman2010-01-291-0/+5
| | | | | | | | | | | | | | | | Before: <stdin>:94:1: note: possible intended match here movsd 4096(%rsi), %xmm0 ^ After: <stdin>:94:2: note: possible intended match here movsd 4096(%rsi), %xmm0 ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94847 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the position of the caret in the FileCheck error message.Dan Gohman2010-01-291-1/+4
| | | | | | | | | | | | | | | | | Before: test/CodeGen/X86/lsr-reuse.ll:52:34: error: expected string not found in input ; CHECK: movsd -2048(%rsi), %xmm0 ^ After: test/CodeGen/X86/lsr-reuse.ll:52:10: error: expected string not found in input ; CHECK: movsd -2048(%rsi), %xmm0 ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94846 91177308-0d34-0410-b5e6-96231b3b80d8
* FileCheck: Switch "possible match" calculation to use StringRef::edit_distance.Daniel Dunbar2010-01-291-6/+1
| | | | | | - Thanks Doug, who is obviously less lazy than me! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94795 91177308-0d34-0410-b5e6-96231b3b80d8
* Quick fix to make the header file for the enhancedSean Callanan2010-01-291-3/+3
| | | | | | | | disassembly information have a better comment (and better guard macros). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94781 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize 'add_executable' when analyzing CMake files.Ted Kremenek2010-01-291-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94777 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake build.Ted Kremenek2010-01-291-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94776 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a custom TableGen backend to support theSean Callanan2010-01-293-0/+905
| | | | | | | | enhanced disassembler, and the necessary makefile rules to build the table for X86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94764 91177308-0d34-0410-b5e6-96231b3b80d8
* Escape double quotes in 'help'.Mikhail Glushenkov2010-01-261-2/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94543 91177308-0d34-0410-b5e6-96231b3b80d8
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-242-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
* Modified the register matcher function in AsmMatcher toSean Callanan2010-01-231-3/+5
| | | | | | | | | | | | be static. Also made it possible for clients to get it and no other functions from ...GenAsmMatcher.inc by defining REGISTERS_ONLY before including GenAsmMatcher.inc. This sets the stage for target-specific lexers that can identify registers and return AsmToken::Register as appropriate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94266 91177308-0d34-0410-b5e6-96231b3b80d8