summaryrefslogtreecommitdiff
path: root/utils
Commit message (Collapse)AuthorAge
* Fix a bunch of namespace polution.Dan Gohman2010-04-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101376 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary uses of <iostream>.Daniel Dunbar2010-04-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101338 91177308-0d34-0410-b5e6-96231b3b80d8
* EDis: Don't include inttypes.h. We support compilers which don't provide it. ↵Benjamin Kramer2010-04-14
| | | | | | It was unused anyways. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101241 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix -Asserts warnings.Daniel Dunbar2010-04-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101191 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a nasty layering violation in the edis sourceSean Callanan2010-04-13
| | | | | | | | | | | | | | | | code. It used to #include the enhanced disassembly information for the targets it supported straight out of lib/Target/{X86,ARM,...} but now it uses a new interface provided by MCDisassembler, and (so far) implemented by X86 and ARM. Also removed hacky #define-controlled initialization of targets in edis. If clients only want edis to initialize a limited set of targets, they can set --enable-targets on the configure command line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101179 91177308-0d34-0410-b5e6-96231b3b80d8
* If all the bit positions are not specified; do not decode the instructions.Johnny Chen2010-04-09
| | | | | | | | | | | We are bound to fail! For proper disassembly, the well-known encoding bits of the instruction must be fully specified. This also removes pseudo instructions from considerations of disassembly, which is a better design and less fragile than the name matchings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100899 91177308-0d34-0410-b5e6-96231b3b80d8
* add minix support, patch by Kees van Reeuwijk! PR6797Chris Lattner2010-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100895 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide versions of the ARM eh_sjlj_setjmp instructions for non-VFP subtargetsBob Wilson2010-04-09
| | | | | | | | | | such that the non-VFP versions have no implicit defs of VFP registers. If any callee-saved VFP registers are marked as having been defined, the prologue/epilogue code will try to save and restore them. Radar 7770432. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100892 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM decoder emitter should print out useful information unconditionally when itJohnny Chen2010-04-09
| | | | | | | encounters decoding conflicts, instead of wrapping it inside the DEBUG() macro. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100886 91177308-0d34-0410-b5e6-96231b3b80d8
* lit: Add support to OneCommandPerFileTest format to take input directory ↵Daniel Dunbar2010-04-09
| | | | | | from input path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100846 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that Evan Cheng has fixed the coalescer bug (r100804), the workaround codeJohnny Chen2010-04-08
| | | | | | | to avoid memcpy() call is no longer necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100811 91177308-0d34-0410-b5e6-96231b3b80d8
* Various MSVC warning fixes about truncated 64 bit shifts and const pointers ↵Benjamin Kramer2010-04-08
| | | | | | passed to free. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100767 91177308-0d34-0410-b5e6-96231b3b80d8
* Use errs instead of fprintf.Benjamin Kramer2010-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100754 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for ARM disassembly to edis.Sean Callanan2010-04-08
| | | | | | | | | | | | I also added a rule to the ARM target's Makefile to build the ARM-specific instruction information table for the enhanced disassembler. I will add the test harness for all this stuff in a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100735 91177308-0d34-0410-b5e6-96231b3b80d8
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
* add newlines at end of files.Chris Lattner2010-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100706 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a bug where the disassembler would allow an immediateSean Callanan2010-04-07
| | | | | | | | | | argument that had to be between 0 and 7 to have any value, firing an assert later in the AsmPrinter. Now, the disassembler rejects instructions with out-of-range values for that immediate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100694 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo and correct comment somewhat.Eric Christopher2010-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100691 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-enable ARM/Thumb disassembler and add a workaround for a memcpy() call inJohnny Chen2010-04-07
| | | | | | | ARMDecoderEmitter.cpp, with FIXME comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100690 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for different kinds of FU reservation.Anton Korobeynikov2010-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100645 91177308-0d34-0410-b5e6-96231b3b80d8
* stringref-ize the MemoryBuffer::get apis. This requiresChris Lattner2010-04-05
| | | | | | | a co-committed clang patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100485 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace TSFlagsFields and TSFlagsShifts with a simpler TSFlags field.Jakob Stoklund Olesen2010-04-05
| | | | | | | | | | | | | | | | | | | When a target instruction wants to set target-specific flags, it should simply set bits in the TSFlags bit vector defined in the Instruction TableGen class. This works well because TableGen resolves member references late: class I : Instruction { AddrMode AM = AddrModeNone; let TSFlags{3-0} = AM.Value; } let AM = AddrMode4 in def ADD : I; TSFlags gets the expected bits from AddrMode4 in this example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100384 91177308-0d34-0410-b5e6-96231b3b80d8
* change a ton of code to not implicitly use the "O" raw_ostreamChris Lattner2010-04-04
| | | | | | | member of AsmPrinter. Instead, pass it in explicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100306 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a warning in GCC about a pointless typedef.Chandler Carruth2010-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100268 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the new ARMDecodeEmitter to CMake build.Chandler Carruth2010-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100267 91177308-0d34-0410-b5e6-96231b3b80d8
* Move variable "Bits" declaration/definition into the DEBUG block where its usageJohnny Chen2010-04-02
| | | | | | | is expected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100247 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed build warning.Johnny Chen2010-04-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100244 91177308-0d34-0410-b5e6-96231b3b80d8
* Change from .../Support/DataTypes.h to .../System/DataTypes.h.Johnny Chen2010-04-02
| | | | | | | (Fix build failure) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100243 91177308-0d34-0410-b5e6-96231b3b80d8
* Second try of initial ARM/Thumb disassembler check-in. It consists of a tablgenJohnny Chen2010-04-02
| | | | | | | | | | | backend (ARMDecoderEmitter) which emits the decoder functions for ARM and Thumb, and the disassembler core which invokes the decoder function and builds up the MCInst based on the decoded Opcode. Reviewed by Chris Latter and Bob Wilson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100233 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a FIXME.Daniel Dunbar2010-03-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100034 91177308-0d34-0410-b5e6-96231b3b80d8
* lit: Make sure to close any files we open as part of redirection.Daniel Dunbar2010-03-31
| | | | | | | PR6753. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100032 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch pattern sorting predicate from stable sort -> sort, itChris Lattner2010-03-29
| | | | | | | | | | | | | | | | | | | | | | doesn't need to be stable because the patterns are fully ordered. Add a first level sort predicate that orders patterns in this order: 1) scalar integer operations 2) scalar floating point 3) vector int 4) vector float. This is a trivial sort on their top level pattern type so it is nice and transitive. The benefit of doing this is that simple integer operations are much more common than insane vector things and isel was trying to match the big complex vector patterns before the simple ones because the complexity of the vector operations was much higher. Since they can't both match, it is best (for compile time) to try the simple integer ones first. This cuts down the # failed match attempts on real code by quite a bit, for example, this reduces backtracks on crafty (as a random example) from 228285 -> 188369. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99797 91177308-0d34-0410-b5e6-96231b3b80d8
* revert 99795, as mentioned, it is disabled anyway.Chris Lattner2010-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99796 91177308-0d34-0410-b5e6-96231b3b80d8
* Check in a (disabled) failed attempt to improve the ordering of Chris Lattner2010-03-29
| | | | | | | | | | patterns within the generated matcher. This works great except that the sort fails because the relation defined isn't transitive. I have a much simpler solution coming next, but want to archive the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99795 91177308-0d34-0410-b5e6-96231b3b80d8
* print the complexity of the pattern being matched in theChris Lattner2010-03-29
| | | | | | | comment in the generated table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99794 91177308-0d34-0410-b5e6-96231b3b80d8
* improve type checking of SDNode operand count. This rejects all casesChris Lattner2010-03-28
| | | | | | | | where an incorrect number of operands is provided to an sdnode instead of just a few cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99761 91177308-0d34-0410-b5e6-96231b3b80d8
* finally remove the immAllOnesV_bc/immAllZerosV_bc patternsChris Lattner2010-03-28
| | | | | | | | | | | | and those derived from them. These are obnoxious because they were written as: PatLeaf<(bitconvert). Not having an argument was foiling adding better type checking for operand count matching up with what was required (in this case, bitconvert always requires an operand!) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99759 91177308-0d34-0410-b5e6-96231b3b80d8
* teach tblgen to allow patterns like (add (i32 (bitconvert (i32 GPR))), 4), Chris Lattner2010-03-28
| | | | | | | | | | transforming it into (add (i32 GPR), 4). This allows us to write type generic multi patterns and have tblgen automatically drop the bitconvert in the case when the types align. This allows us to fold an extra load in the changed testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99756 91177308-0d34-0410-b5e6-96231b3b80d8
* validate that input sdnodes don't exist in an output pattern.Chris Lattner2010-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99747 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate a bunch of code duplication in ParseTreePatternChris Lattner2010-03-28
| | | | | | | by rotating it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99746 91177308-0d34-0410-b5e6-96231b3b80d8
* SDTCisVT<0, isVoid> is not valid, reject it.Chris Lattner2010-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99744 91177308-0d34-0410-b5e6-96231b3b80d8
* add an optimized form of OPC_EmitMergeInputChains for the 1, 0 and Chris Lattner2010-03-28
| | | | | | | | 1, 1 cases which are by-far the most frequent. This shrinks the X86 isel table from 77014 -> 74657 bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99740 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a long standing fixme, which required fixing a bunch of otherChris Lattner2010-03-27
| | | | | | | | | | | | | | | issues to get here. We now trim the result type list of the CompleteMatch or MorphNodeTo operation to be the same size as the thing we're matching. this means that if you match (add GPR, GPR) with an instruction that produces a normal result and a flag that we now trim the result in tblgen instead of having to do it dynamically. This exposed a bunch of inconsistencies in result counting that happened to be getting lucky since the days of the old isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99728 91177308-0d34-0410-b5e6-96231b3b80d8
* fix CodeGenTarget::getRegisterVTs to not return the Chris Lattner2010-03-27
| | | | | | | | | same vt multiple times for a register. For example, ECX is in 5 different i32 reg classes, just return 1 i32 instead of 5. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99727 91177308-0d34-0410-b5e6-96231b3b80d8
* hoist some funky logic into CodeGenInstructionChris Lattner2010-03-27
| | | | | | | | | | from two places in CodeGenDAGPatterns.cpp, and use it in DAGISelMatcherGen.cpp instead of using an incorrect predicate that happened to get lucky on our current targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99726 91177308-0d34-0410-b5e6-96231b3b80d8
* continue pushing tblgen's support for nodes with multipleChris Lattner2010-03-27
| | | | | | | | | results forward. We can now handle an instruction that produces one implicit def and one result instead of one or the other when not at the root of the pattern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99725 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a bug in my recent patch that increased opcode size to 2 bytes:Chris Lattner2010-03-27
| | | | | | | | the index comments nested under OPC_SwitchOpcode were off by one. This fixes the comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99722 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an unnecessary #include.Dan Gohman2010-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99714 91177308-0d34-0410-b5e6-96231b3b80d8
* remove parallel support.Chris Lattner2010-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99703 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach TableGen to understand X.Y notation in the TSFlagsFields strings.Jakob Stoklund Olesen2010-03-25
| | | | | | | Remove much horribleness from X86InstrFormats as a result. Similar simplifications are probably possible for other targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99539 91177308-0d34-0410-b5e6-96231b3b80d8