Commit Graph

62625 Commits

Author SHA1 Message Date
Chris Lattner 979634bbb0 start straightening out libedis's dependencies and make it fit
better in the llvm world.  Among other things, this changes:

1. The guts of libedis are now moved into lib/MC/MCDisassembler
2. llvm-mc now depends on lib/MC/MCDisassembler, not tools/edis,
   so edis and mc don't have to be built in series.
3. lib/MC/MCDisassembler no longer depends on the C api, the C
   API depends on it.
4. Various code cleanup changes. 

There is still a lot to be done to make edis fit with the llvm
design, but this is an incremental step in the right direction.

llvm-svn: 108869
2010-07-20 18:25:19 +00:00
Gabor Greif b64d5b7202 remove testing cruft, this can be found in unittests/Support/Casting.cpp now
llvm-svn: 108868
2010-07-20 17:20:25 +00:00
Dan Gohman 12725c7d46 Remember that the induction variable is always a PHINode and
use getIncomingValueForBlock instead of
LoopInfo::getCanonicalInductionVariableIncrement.

llvm-svn: 108865
2010-07-20 17:18:52 +00:00
Gabor Greif c4dc39355e migrate essentially everything from under #ifdef DEBUG_CAST_OPERATORS into this file
llvm-svn: 108864
2010-07-20 17:06:28 +00:00
Dan Gohman 625fd2292d Fix SCEV denormalization of expressions where the exit value from
one loop is involved in the increment of an addrec for another
loop. This fixes rdar://8168938.

llvm-svn: 108863
2010-07-20 17:06:20 +00:00
Owen Anderson 3183ef1120 Pull out r108755. After offline discussion with Chris, we're going to go a different direction with this.
llvm-svn: 108856
2010-07-20 16:55:05 +00:00
Dan Gohman 46f00a25f9 Add a fast path for x - x.
llvm-svn: 108855
2010-07-20 16:53:00 +00:00
Gabor Greif 1804d30cf1 extend to cast<> and cast_or_null<> tests
llvm-svn: 108854
2010-07-20 16:51:18 +00:00
Dan Gohman 31158756e4 Simplify this code; LoopInfo::getCanonicalInductionVariable will only
find integer induction variables.

llvm-svn: 108853
2010-07-20 16:46:58 +00:00
Dan Gohman 4fd92434f1 Make getOrInsertCanonicalInductionVariable guarantee that its
result is a PHINode*.

llvm-svn: 108852
2010-07-20 16:44:52 +00:00
Gabor Greif 3eae1b3b4b isa<> tests
llvm-svn: 108851
2010-07-20 16:38:12 +00:00
Dan Gohman 191f2e4dbd Change an argument from an Instruction* to a Value*, which is all
that is needed here.

llvm-svn: 108850
2010-07-20 16:34:50 +00:00
Gabor Greif 704524ae70 initial checkin for unittest to exercise Support/Casting.h
this is still minimal on purpose, but I plan to migrate the ugly
hack under #ifdef DEBUG_CAST_OPERATORS into this file

llvm-svn: 108849
2010-07-20 16:32:20 +00:00
Dan Gohman d1488fd8bc Minor code cleanups.
llvm-svn: 108848
2010-07-20 16:32:11 +00:00
Jim Grosbach badf087e45 update tests for smarter BIC usage
llvm-svn: 108846
2010-07-20 16:16:48 +00:00
Jakob Stoklund Olesen ff095507e3 Appease the colonials.
llvm-svn: 108845
2010-07-20 16:12:37 +00:00
Jim Grosbach 3680f70c9d Using BIC for immediates needs an extra bump for its complexity to get
instruction selection to prefer it when possible. rdar://7903972

llvm-svn: 108844
2010-07-20 16:07:04 +00:00
Duncan Sands 2e839de377 The same problem was being tracked in PR7652.
llvm-svn: 108843
2010-07-20 15:52:32 +00:00
Jakob Stoklund Olesen 36d12c679d Beginning SplitKit - utility classes for live range splitting.
This is a work in progress. So far we have some basic loop analysis to help
determine where it is useful to split a live range around a loop.

The actual loop splitting code from Splitter.cpp is also going to move in here.

llvm-svn: 108842
2010-07-20 15:41:07 +00:00
Jim Grosbach 9c7708cc1b Removed un-used code.
llvm-svn: 108841
2010-07-20 14:51:32 +00:00
Lang Hames 31dfb75b52 Updated css classes for the pressure table legend.
llvm-svn: 108839
2010-07-20 14:35:55 +00:00
Lang Hames 2ff2193a80 Oops - I tables render poorly in Chrome without this explicit height specification.
llvm-svn: 108824
2010-07-20 10:29:46 +00:00
Lang Hames a475ab7f02 Use run-length encoding to represent identical adjacent cells in the pressure
and interval table. Reduces output HTML file sizes by ~80% in my test cases.

Also fix access of private member type by << operator.

llvm-svn: 108823
2010-07-20 10:18:54 +00:00
Lang Hames 716b184108 Added support for turning HTML indentation on and off (indentation off by default).
Reduces output file size ~20% on my test cases.

llvm-svn: 108822
2010-07-20 09:13:29 +00:00
Bruno Cardoso Lopes 56129bd62f Enable LLVM to compile on Mips. Fix PR5828
llvm-svn: 108821
2010-07-20 08:44:20 +00:00
Bruno Cardoso Lopes 160695fecb Fix PR7174, a couple o Mips fixes:
- Fix a typo for PIC check during jmp table lowering
- Also fix the "first jump table basic block is not
considered only reachable by fall through" problem, use this
ad-hoc solution until I come up with something better.

Patch by stetorvs@gmail.com

llvm-svn: 108820
2010-07-20 08:37:04 +00:00
Owen Anderson 81781220d2 Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch
would cause them to fail the way they are, but none of the other intervening patches seem likely either.

llvm-svn: 108818
2010-07-20 08:26:15 +00:00
Bruno Cardoso Lopes ea7863647b Fix Mips PR7473. Patch by stetorvs@gmail.com
llvm-svn: 108816
2010-07-20 07:58:51 +00:00
Lang Hames a93fe2de3c Switched to rendering after allocation (but before rewriting) in PBQP.
Updated renderer to use allocation information from VirtRegMap (if
available) to render spilled intervals differently.

llvm-svn: 108815
2010-07-20 07:41:44 +00:00
Eric Christopher 865f0473d0 Grammar.
llvm-svn: 108814
2010-07-20 06:56:13 +00:00
Owen Anderson 8dc129325f Reapply r108794, a fix for the failing test from last time.
llvm-svn: 108813
2010-07-20 06:52:42 +00:00
Eric Christopher 4adaccf0bf Constify some arguments.
llvm-svn: 108812
2010-07-20 06:52:21 +00:00
Daniel Dunbar 4a35d6f8cd Revert r108794, "Separate PassInfo into two classes: a constructor-free
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.

llvm-svn: 108805
2010-07-20 03:06:07 +00:00
Owen Anderson e7c5fe586a Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).
llvm-svn: 108794
2010-07-20 01:19:58 +00:00
Dan Gohman 3ff13affda Minor code simplification.
llvm-svn: 108793
2010-07-20 00:57:18 +00:00
Dale Johannesen 08645f1991 Don't hoist things out of a large switch inside a
loop, for the reasons in the comments.  This is a
major win on 253.perlbmk on ARM Darwin.  I expect it
to be a good heuristic in general, but it's possible
some things will regress; I'll be watching.
7940152.

llvm-svn: 108792
2010-07-20 00:50:13 +00:00
Bruno Cardoso Lopes 6c8041ea34 x86_32 tests for vbroadcast
llvm-svn: 108789
2010-07-20 00:11:50 +00:00
Bruno Cardoso Lopes 14c5fd437c Add AVX vbroadcast new instruction
llvm-svn: 108788
2010-07-20 00:11:13 +00:00
Daniel Dunbar 0aff8033c6 Update CMake files.
llvm-svn: 108787
2010-07-20 00:08:13 +00:00
Stuart Hastings 61475c5c3c Correct line info for declarations/definitions. Radar 8063111.
llvm-svn: 108784
2010-07-19 23:56:30 +00:00
Chris Lattner b792b463af sink the arm implementations of ASmPrinter and MCInstLower
out of the AsmPrinter directory into libarm.  Now the
ARM InstPrinters depend jsut on the MC stuff, not on vmcore
or codegen.

llvm-svn: 108783
2010-07-19 23:44:46 +00:00
Chris Lattner 64fffadad3 fix a layering problem by moving the x86 implementation
of AsmPrinter and InstLowering into libx86 and out of the
asmprinter subdirectory.  Now X86/AsmPrinter just depends on
MC stuff, not all of codegen and LLVM IR.

llvm-svn: 108782
2010-07-19 23:41:57 +00:00
Bruno Cardoso Lopes 9de0ca73d4 Add 256-bit vaddsub, vhadd, vhsub, vblend and vdpp instructions!
llvm-svn: 108769
2010-07-19 23:32:44 +00:00
Devang Patel d61b735d25 Fix memory leak reported by valgrind.
Do not visit operands of old instruction. Visit all operands of new instruction.

llvm-svn: 108767
2010-07-19 23:25:39 +00:00
Dan Gohman b5e918dc05 After a custom inserter, in a block which has constant instructions,
update the current basic block in addition to the current insert
position, so that they remain consistent. This fixes rdar://8204072.

llvm-svn: 108765
2010-07-19 22:48:56 +00:00
Evan Cheng 10f99a3490 ARM has to provide its own TargetLowering::findRepresentativeClass because its scalar floating point registers alias its vector registers.
llvm-svn: 108761
2010-07-19 22:15:08 +00:00
Jim Grosbach be2622f70d long past time I added myself to this, I suppose.
llvm-svn: 108759
2010-07-19 22:04:28 +00:00
Owen Anderson 0edf6a1131 Change the implemented interfaces list on PassInfo from a std::vector to a manually implemented
linked list.  This is a little slower and involves more malloc'ing, but these lists are
typically short, and it allows PassInfo to be entirely constant initializable.

llvm-svn: 108755
2010-07-19 21:44:48 +00:00
Bob Wilson a7d44a1ab6 Save a copy of the unstripped libLTO.dylib in $SYM_DIR. Clean up the code
for dealing with libLTO.dylib to put it all in one place and to allow
use of DISABLE_USR_LINKS.

llvm-svn: 108753
2010-07-19 21:33:07 +00:00
Daniel Dunbar 6b4391aa69 MC/Mach-O: Silently ignore .file directives instead of error'ing out on
them. They aren't important enough to abort the entire assembly, and failing
early makes testing more annoying.

llvm-svn: 108747
2010-07-19 20:44:20 +00:00
Daniel Dunbar 9db7d0addd X86: Mark JMP{32,64}[mr] as requires 32-bit/64-bit mode. They are the same
instruction, we only want to allow the one for the current subtarget.
 - This also fixes suffix matching for jmp instructions, because it eliminates
   the ambiguity between 'jmpl' and 'jmpq'.

llvm-svn: 108746
2010-07-19 20:44:16 +00:00
Owen Anderson 0235241eab Regenerate.
llvm-svn: 108740
2010-07-19 19:42:01 +00:00
Owen Anderson 311eff99d0 Remove extraneous character.
llvm-svn: 108739
2010-07-19 19:41:52 +00:00
Owen Anderson 0e41b1c9c0 Regenerate.
llvm-svn: 108738
2010-07-19 19:24:55 +00:00
Owen Anderson 7661763741 Add support for detecting <mach-o/getsect.h> and the getsect() function.
llvm-svn: 108737
2010-07-19 19:24:37 +00:00
Owen Anderson 84774eda4b Tweak per Chris' comments.
llvm-svn: 108736
2010-07-19 19:23:32 +00:00
Evan Cheng 7a135510e3 Teach computeRegisterProperties() to compute "representative" register class for legal value types. A "representative" register class is the largest legal super-reg register class for a value type. e.g. On i386, GR32 is the rep register class for i8 / i16 / i32; on x86_64 it would be GR64.
This property will be used by the register pressure tracking instruction scheduler.

llvm-svn: 108735
2010-07-19 18:47:01 +00:00
Jakob Stoklund Olesen a58a7e7f9e Spillers may alter MachineLoopInfo when breaking critical edges, so make it
non-const.

llvm-svn: 108734
2010-07-19 18:41:20 +00:00
Dale Johannesen d4e389441d Testcase for 108732 (8195660).
llvm-svn: 108733
2010-07-19 18:22:40 +00:00
Devang Patel 18efced1a2 Fix PR 7662.
Do not try to insert local variable info to a DIE used for function declaration.

llvm-svn: 108731
2010-07-19 17:53:55 +00:00
Jim Grosbach 8d3ba7349c Since ARM emits inline jump tables as part of the ConstantIsland pass,
it should set the jump table encloding the EK_Inline. This prevents
a second, unused, copy of the table from being emitted after the function
body. PR6581.

llvm-svn: 108730
2010-07-19 17:20:38 +00:00
Jim Grosbach d9ad52adff revert so I can get the right PR# in the log message.
llvm-svn: 108727
2010-07-19 17:19:40 +00:00
Jim Grosbach c685756cfb Since ARM emits inline jump tables as part of the ConstantIsland pass,
it should set the jump table encloding the EK_Inline. This prevents
a second, unused, copy of the table from being emitted after the function
body. PR7499.

llvm-svn: 108722
2010-07-19 17:18:28 +00:00
Mikhail Glushenkov 1432699cb2 Remove code duplication.
llvm-svn: 108718
2010-07-19 17:17:22 +00:00
Mikhail Glushenkov 4fc84a0dcd Better error reporting for switch_list.
llvm-svn: 108714
2010-07-19 17:17:10 +00:00
Benjamin Kramer 58c283ee85 Update CMake build.
llvm-svn: 108700
2010-07-19 15:37:03 +00:00
Duncan Sands b1d61aab06 Expose BasicBlock::moveBefore and moveAfter in C API, patch
by Benjamin Saunders.

llvm-svn: 108699
2010-07-19 15:31:07 +00:00
Lang Hames 6624efb711 Render MachineFunctions to HTML pages, with options to render register
pressure estimates and liveness alongside.

Still experimental.

llvm-svn: 108698
2010-07-19 15:22:28 +00:00
Gabor Greif 39c06b3b23 precompute 20 tags
llvm-svn: 108695
2010-07-19 14:48:15 +00:00
Duncan Sands 953e617de6 Fix indentation.
llvm-svn: 108691
2010-07-19 09:36:45 +00:00
Duncan Sands 330134bf15 Expose JIT::recompileAndRelinkFunction for use through the C API.
Patch by Benjamin Saunders.

llvm-svn: 108690
2010-07-19 09:33:13 +00:00
Owen Anderson 3ccd81864f Testcase for r108687.
llvm-svn: 108689
2010-07-19 08:14:26 +00:00
Owen Anderson 9c271e2835 Remove r108639 now that it is handled by InstCombine instead.
llvm-svn: 108688
2010-07-19 08:10:24 +00:00
Owen Anderson 32a58342ed Reimplement r108639 in InstCombine rather than DAGCombine.
llvm-svn: 108687
2010-07-19 08:09:34 +00:00
Daniel Dunbar 9aefb8ee4c X86-64: Mark WINCALL and more tail call instructions as code gen only.
llvm-svn: 108685
2010-07-19 07:21:07 +00:00
Daniel Dunbar 2e9f58517d X86: Mark some tail call pseduo instruction as code gen only.
llvm-svn: 108684
2010-07-19 07:21:04 +00:00
Daniel Dunbar 1cd02510d3 X86: Mark In32/64BitMode on LEAVE[64] and SYSEXIT[64].
llvm-svn: 108683
2010-07-19 07:21:01 +00:00
Michael J. Spencer 2ed9f4bd39 _[A-Z] identifiers are reserved for the implementation.
llvm-svn: 108682
2010-07-19 06:26:19 +00:00
Daniel Dunbar b82cd9319b MC/X86: We now match instructions like "incl %eax" correctly for the arch we are
assembling; remove crufty custom cleanup code.

llvm-svn: 108681
2010-07-19 06:14:54 +00:00
Daniel Dunbar 150d948d3a X86: Mark MOV.*_{TC,NOREX} instruction as code gen only, they aren't real.
llvm-svn: 108680
2010-07-19 06:14:49 +00:00
Daniel Dunbar 961543377d X86: MOV8o8a, MOV8ao8, etc. are only valid in 32-bit mode.
llvm-svn: 108679
2010-07-19 06:14:44 +00:00
Michael J. Spencer e2da0a478d MC: Add WinCOFFStreamer implementation and merge common code from MachO
into MCObjectStreamer.

Origonal Windows COFF implementation by Nathan Jedffords.

llvm-svn: 108678
2010-07-19 06:13:10 +00:00
Daniel Dunbar eefe8616be TblGen/AsmMatcher: Add support for honoring instruction Requires<[]> attributes as part of the matcher.
- Currently includes a hack to limit ourselves to "In32BitMode" and "In64BitMode", because we don't have the other infrastructure to properly deal with setting SSE, etc. features on X86.

llvm-svn: 108677
2010-07-19 05:44:09 +00:00
Bill Wendling 8ee29d134e Alphabetize.
llvm-svn: 108675
2010-07-19 04:52:56 +00:00
Eli Friedman 20b026464e Make .align parse correctly on platforms where .align is measured in bytes.
llvm-svn: 108674
2010-07-19 04:17:25 +00:00
Mikhail Glushenkov 303838d69f llvmc: Add a new option type (switch_list).
llvm-svn: 108673
2010-07-19 03:16:25 +00:00
Daniel Dunbar af75e1923c tests: Force another triple.
llvm-svn: 108666
2010-07-19 00:43:58 +00:00
Daniel Dunbar 419197cc4d Target: Give the TargetAsmParser access to the TargetMachine.
- Unfortunate, but necessary for now to handle subtarget instruction matching. Eventually we should factor out the lower level target machine information so we don't need to do this.

llvm-svn: 108664
2010-07-19 00:33:49 +00:00
Daniel Dunbar fb44525696 edis: Save the TargetMachine in the EDDisassembler object.
llvm-svn: 108663
2010-07-19 00:33:43 +00:00
Michael J. Spencer 6b42acb016 Test commit
llvm-svn: 108662
2010-07-18 23:46:13 +00:00
Daniel Dunbar 8897d479b5 MC/AsmParser: Stop playing unsafe member function pointer calls, this isn't
portable enough.
 - Downside is we now double dispatch through a stub function, but this isn't
   performance critical.

llvm-svn: 108661
2010-07-18 22:22:07 +00:00
Daniel Dunbar 3b4621103a tests: Force triples.
llvm-svn: 108658
2010-07-18 21:16:10 +00:00
Daniel Dunbar 40a564f09f MC/AsmParser: Fix .abort and .secure_log_unique to accept arbitrary token
sequences, not just strings.

llvm-svn: 108655
2010-07-18 20:15:59 +00:00
Daniel Dunbar 6fb1c3ad8a MC/AsmParser: Add macro argument substitution support.
llvm-svn: 108654
2010-07-18 19:00:10 +00:00
Daniel Dunbar 4323571efb MC/AsmParser: Add basic support for macro instantiation.
llvm-svn: 108653
2010-07-18 18:54:11 +00:00
Daniel Dunbar c1f58ec83c MC/AsmParser: Add basic parsing support for .macro definitions.
llvm-svn: 108652
2010-07-18 18:47:21 +00:00
Chris Lattner ede90a2a58 daniel doesn't hate me, he hates macpython 2.5, which
is a very reasonable position on life!

llvm-svn: 108650
2010-07-18 18:42:18 +00:00
Daniel Dunbar 828984ff4e MC/AsmParser: Add .macros_{off,on} support, not that makes sense since we don't
support macros.

llvm-svn: 108649
2010-07-18 18:38:02 +00:00
Daniel Dunbar d8a1845c31 MC/AsmParser: Use Error() instead of calling PrintMessage() directly.
llvm-svn: 108648
2010-07-18 18:31:45 +00:00
Daniel Dunbar ba6e354b61 MC/AsmParser: Fix TokError() to accept a Twine.
llvm-svn: 108647
2010-07-18 18:31:42 +00:00