Commit Graph

40278 Commits

Author SHA1 Message Date
Dan Gohman
557c83c99e NamedMDNode is never an operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109031 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 20:25:43 +00:00
Dan Gohman
872814ae04 Disallow null as a named metadata operand.
Make MDNode::destroy private.
Fix the one thing that used MDNode::destroy, outside of MDNode itself.

One should never delete or destroy an MDNode explicitly. MDNodes
implicitly go away when there are no references to them (implementation
details aside).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109028 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 18:54:18 +00:00
Dan Gohman
d9c86dc6d9 Use TrackingVH instead of WeakVH for NamedMDNode's operands, since nodes
referenced by NamedMDNodes shouldn't be deleted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109021 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 18:01:42 +00:00
Dan Gohman
1ec7f5feb3 Tidy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109020 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 17:53:53 +00:00
Owen Anderson
9650983b9a Move the smarts of AnalysisGroup registration into PassRegistry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109019 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 17:52:45 +00:00
Rafael Espindola
bc56501435 Fix calling convention on ARM if vfp2+ is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109009 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 11:38:30 +00:00
Eric Christopher
dab4dac2a0 Pulling out previous patch, must've run the tests in
the wrong directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109005 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 09:23:56 +00:00
Eric Christopher
87f41370a8 Lower MEMBARRIER on x86 and support processors without SSE2.
Fixes a pile of libgomp failures in the llvm-gcc testsuite due
to the libcall not existing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109004 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 09:05:23 +00:00
Lang Hames
5a8ea65c5c Changed OStream templates to functions on raw_ostream, removed the unused "renderWarnings" function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109003 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 09:02:06 +00:00
Bruno Cardoso Lopes
cf6ca03128 Add AVX only vzeroall and vzeroupper instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109002 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 08:56:24 +00:00
Evan Cheng
4f6b4674be Teach bottom up pre-ra scheduler to track register pressure. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108991 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 06:09:07 +00:00
Bruno Cardoso Lopes
7d7d15a159 Add new AVX vpermilps, vpermilpd and vperm2f128 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108984 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 03:07:42 +00:00
Bruno Cardoso Lopes
4b13f3cf3d Add new AVX vmaskmov instructions, and also fix the VEX encoding bits to support it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108983 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 02:46:58 +00:00
Dan Gohman
3bdfbf5d56 Give MDNode printing has access to the current Module in more
cases. This will be needed when function-local metadata can
appear in places that aren't intrinsic function arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108971 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 23:55:01 +00:00
Jakob Stoklund Olesen
f2c6e367c1 Change the createSpiller interface to take a MachineFunctionPass argument.
The spillers can pluck the analyses they need from the pass reference.

Switch some never-null pointers to references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108969 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 23:50:15 +00:00
Dan Gohman
549979f550 Make this code a little more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108968 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 23:49:44 +00:00
Dan Gohman
333a94765a Use DebugLocs instead of MDNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108967 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 23:49:05 +00:00
Owen Anderson
539673579e Move the handling of PassRegistrationListener's to PassRegistry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108966 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 23:41:56 +00:00
Bruno Cardoso Lopes
1154f426d7 Add new AVX vextractf128 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108964 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 23:19:02 +00:00
Dan Gohman
e336cbc450 Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108962 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 23:10:36 +00:00
Dan Gohman
7bc230ec6a Don't look up the "dbg" metadata kind by name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108961 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 23:09:34 +00:00
Chris Lattner
6e8154354f make asmprinter optional, even though passing in null will cause things to explode right now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108955 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 22:45:33 +00:00
Chris Lattner
cb63ecba31 continue pushing dependencies around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108952 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 22:35:40 +00:00
Chris Lattner
c0115b5ca1 reduce X86MCInstLower dependencies on asmprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108950 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 22:30:53 +00:00
Chris Lattner
0c13cf36ad pass around MF, not MMI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108949 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 22:26:07 +00:00
Dan Gohman
4f1be4abba Rename removeAllMetadata to clearMetadataHashEntries and simplify
it to just do the things that need to be done when an instruction
is deleted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108948 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 22:25:04 +00:00
Chris Lattner
7648bd428b cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108947 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 22:23:57 +00:00
Chris Lattner
1a34c83caf move two asmprinter methods into the asmprinter .cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108945 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 22:18:19 +00:00
Jakob Stoklund Olesen
6a0dc079ef Implement loop splitting analysis.
Determine which loop exit blocks need a 'pre-exit' block inserted.
Recognize when this would be impossible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108941 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:46:58 +00:00
Dan Gohman
19538d1e9f Add support for remapping metadata kind IDs when reading in a
bitcode file, so that two bitcode files where the same metadata kind
name happens to have been assigned a different ID can still be
linked together.

Eliminate the restriction that metadata kind IDs can't be 0.

Change MD_dbg from 1 to 0, because we can now, and because it's
less mysterious that way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108939 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:42:28 +00:00
Dale Johannesen
21d35c1399 Fix test for switch statements and increase
threshold a bit per experimentation.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108935 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:29:12 +00:00
Owen Anderson
aac07eaeef Move more functionality from Pass.cpp to PassRegistry.cpp. This global will go away eventually, but for now we still need it around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108932 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:22:24 +00:00
Chris Lattner
4dbbe3433f prune #includes a little.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108929 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:17:29 +00:00
Matt Fleming
f525c2a8af Add some more handlers for ELF section directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108928 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:12:46 +00:00
Dan Gohman
a09e67af33 Remove setDbgMetadata and getDbgMetadata; their users have been
replaced with setDebugLoc and getDebugLoc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108914 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 20:18:21 +00:00
Owen Anderson
8238f02650 Let's get those buildbots green: #include is needed in the header, not just the implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108912 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 20:16:11 +00:00
Dan Gohman
bda0252639 Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata,
avoiding MDNode overhead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108909 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 20:09:07 +00:00
Chris Lattner
e5b2b88381 apparently also missing an include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108908 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 20:06:19 +00:00
Chris Lattner
8f5880c093 this is in System
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108895 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 19:54:01 +00:00
Bruno Cardoso Lopes
e1c29be6f0 Add new AVX instruction vinsertf128
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108892 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 19:44:51 +00:00
Chris Lattner
6f0414a407 turn this into a normal header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108891 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 19:43:19 +00:00
Chris Lattner
1c861a0253 hopefully heal the linux builders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108890 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 19:40:51 +00:00
Owen Anderson
ee9886ed3d I just fail with SVN today.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108888 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 19:23:55 +00:00
Chris Lattner
a4f15d66ab there is no reason to dynamically generate a static header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108887 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:59:58 +00:00
Chris Lattner
234db004f9 drop edinfo.inc into the objdir for src!=objdir builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108886 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:53:27 +00:00
Eric Christopher
aab5b3259f Update header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108883 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:46:43 +00:00
Owen Anderson
39b890dfa2 Convert the internal PassRegistrar class into a new, external PassRegistry class. No intended functionality change at this point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108877 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:39:06 +00:00
Chris Lattner
fed3fed251 hopefully teach cmake to build the .inc file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108874 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:33:21 +00:00
Chris Lattner
ca2fcac09d cmake too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108872 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:30:37 +00:00
Chris Lattner
bd9de839c4 forgot to add a file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108870 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:29:50 +00:00
Chris Lattner
847da55716 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108869 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:25:19 +00:00
Dan Gohman
43ef3fbae1 Remember that the induction variable is always a PHINode and
use getIncomingValueForBlock instead of
LoopInfo::getCanonicalInductionVariableIncrement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108865 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 17:18:52 +00:00
Dan Gohman
fc3678a346 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108863 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 17:06:20 +00:00
Owen Anderson
2dcacabc71 Pull out r108755. After offline discussion with Chris, we're going to go a different direction with this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108856 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:55:05 +00:00
Dan Gohman
eb4152c192 Add a fast path for x - x.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108855 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:53:00 +00:00
Dan Gohman
133e295b36 Simplify this code; LoopInfo::getCanonicalInductionVariable will only
find integer induction variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108853 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:46:58 +00:00
Dan Gohman
7c58dbd88c Make getOrInsertCanonicalInductionVariable guarantee that its
result is a PHINode*.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108852 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:44:52 +00:00
Dan Gohman
b7391fadff Change an argument from an Instruction* to a Value*, which is all
that is needed here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108850 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:34:50 +00:00
Dan Gohman
082d6b6536 Minor code cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108848 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:32:11 +00:00
Jakob Stoklund Olesen
abff28087f Appease the colonials.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108845 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:12:37 +00:00
Jim Grosbach
f084a5e81d Using BIC for immediates needs an extra bump for its complexity to get
instruction selection to prefer it when possible. rdar://7903972

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108844 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:07:04 +00:00
Jakob Stoklund Olesen
8ae0263471 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108842 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 15:41:07 +00:00
Jim Grosbach
26ede6834e Removed un-used code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108841 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 14:51:32 +00:00
Lang Hames
6089e464dd Updated css classes for the pressure table legend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108839 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 14:35:55 +00:00
Lang Hames
2725abd039 Oops - I tables render poorly in Chrome without this explicit height specification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108824 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 10:29:46 +00:00
Lang Hames
f80f31eb9f 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108823 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 10:18:54 +00:00
Lang Hames
245581b1ac Added support for turning HTML indentation on and off (indentation off by default).
Reduces output file size ~20% on my test cases.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108822 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 09:13:29 +00:00
Bruno Cardoso Lopes
46773793cb 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108820 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 08:37:04 +00:00
Owen Anderson
8be3291f59 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108818 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 08:26:15 +00:00
Bruno Cardoso Lopes
29e9daa750 Fix Mips PR7473. Patch by stetorvs@gmail.com
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108816 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 07:58:51 +00:00
Lang Hames
c4bcc778a8 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108815 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 07:41:44 +00:00
Owen Anderson
9e081004da Reapply r108794, a fix for the failing test from last time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108813 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 06:52:42 +00:00
Eric Christopher
72852a8cfb Constify some arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108812 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 06:52:21 +00:00
Daniel Dunbar
e8a469cdb4 Revert r108794, "Separate PassInfo into two classes: a constructor-free
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108805 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 03:06:07 +00:00
Owen Anderson
8ba15cb709 Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108794 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 01:19:58 +00:00
Dan Gohman
fb272ad614 Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108793 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 00:57:18 +00:00
Dale Johannesen
bf1ae5e254 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108792 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 00:50:13 +00:00
Bruno Cardoso Lopes
43945d99de Add AVX vbroadcast new instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108788 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 00:11:13 +00:00
Daniel Dunbar
7b81a0ef17 Update CMake files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108787 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 00:08:13 +00:00
Stuart Hastings
0db4271069 Correct line info for declarations/definitions. Radar 8063111.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108784 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 23:56:30 +00:00
Chris Lattner
f447a5f144 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108783 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 23:44:46 +00:00
Chris Lattner
aef40351f6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108782 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 23:41:57 +00:00
Bruno Cardoso Lopes
94143ee625 Add 256-bit vaddsub, vhadd, vhsub, vblend and vdpp instructions!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108769 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 23:32:44 +00:00
Devang Patel
58b8176ed3 Fix memory leak reported by valgrind.
Do not visit operands of old instruction. Visit all operands of new instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108767 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 23:25:39 +00:00
Dan Gohman
c6e59b71f5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108765 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 22:48:56 +00:00
Evan Cheng
d70f57b254 ARM has to provide its own TargetLowering::findRepresentativeClass because its scalar floating point registers alias its vector registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108761 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 22:15:08 +00:00
Owen Anderson
7ee5d35493 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108755 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 21:44:48 +00:00
Daniel Dunbar
96749678c9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108747 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 20:44:20 +00:00
Daniel Dunbar
77e2dd7bb2 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'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108746 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 20:44:16 +00:00
Owen Anderson
5f23a938b0 Tweak per Chris' comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108736 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 19:23:32 +00:00
Evan Cheng
46dcb57e18 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108735 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 18:47:01 +00:00
Jakob Stoklund Olesen
9529a1c3dd Spillers may alter MachineLoopInfo when breaking critical edges, so make it
non-const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108734 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 18:41:20 +00:00
Devang Patel
8b3a6b651e Fix PR 7662.
Do not try to insert local variable info to a DIE used for function declaration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108731 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 17:53:55 +00:00
Jim Grosbach
e1102caf86 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108730 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 17:20:38 +00:00
Jim Grosbach
350afb16ec revert so I can get the right PR# in the log message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108727 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 17:19:40 +00:00
Jim Grosbach
0bb9895a78 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108722 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 17:18:28 +00:00
Benjamin Kramer
5907f4c385 Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108700 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 15:37:03 +00:00
Duncan Sands
837a0c3b05 Expose BasicBlock::moveBefore and moveAfter in C API, patch
by Benjamin Saunders.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 15:31:07 +00:00
Lang Hames
54cc2efb4e Render MachineFunctions to HTML pages, with options to render register
pressure estimates and liveness alongside.

Still experimental.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108698 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 15:22:28 +00:00
Gabor Greif
b68f7aea33 precompute 20 tags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108695 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 14:48:15 +00:00
Duncan Sands
e117b63973 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108691 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 09:36:45 +00:00
Duncan Sands
d90fee9b42 Expose JIT::recompileAndRelinkFunction for use through the C API.
Patch by Benjamin Saunders.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108690 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 09:33:13 +00:00
Owen Anderson
54026c0f1b Remove r108639 now that it is handled by InstCombine instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108688 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 08:10:24 +00:00
Owen Anderson
d90290127b Reimplement r108639 in InstCombine rather than DAGCombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 08:09:34 +00:00
Daniel Dunbar
926f2bb3d8 X86-64: Mark WINCALL and more tail call instructions as code gen only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 07:21:07 +00:00
Daniel Dunbar
e4c52a2c41 X86: Mark some tail call pseduo instruction as code gen only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108684 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 07:21:04 +00:00
Daniel Dunbar
df4c47be29 X86: Mark In32/64BitMode on LEAVE[64] and SYSEXIT[64].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108683 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 07:21:01 +00:00
Michael J. Spencer
e5c8d95f1a _[A-Z] identifiers are reserved for the implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 06:26:19 +00:00
Daniel Dunbar
90b374cded MC/X86: We now match instructions like "incl %eax" correctly for the arch we are
assembling; remove crufty custom cleanup code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108681 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 06:14:54 +00:00
Daniel Dunbar
cf246b7f0b X86: Mark MOV.*_{TC,NOREX} instruction as code gen only, they aren't real.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108680 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 06:14:49 +00:00
Daniel Dunbar
6c2c9a27c5 X86: MOV8o8a, MOV8ao8, etc. are only valid in 32-bit mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108679 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 06:14:44 +00:00
Michael J. Spencer
8067adc271 MC: Add WinCOFFStreamer implementation and merge common code from MachO
into MCObjectStreamer.

Origonal Windows COFF implementation by Nathan Jedffords.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108678 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 06:13:10 +00:00
Daniel Dunbar
54074b5f04 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108677 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 05:44:09 +00:00
Eli Friedman
5d68ec2229 Make .align parse correctly on platforms where .align is measured in bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108674 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 04:17:25 +00:00
Daniel Dunbar
d73ada7d24 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 00:33:49 +00:00
Daniel Dunbar
1edf6ca2cb 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108661 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 22:22:07 +00:00
Daniel Dunbar
6a46d571b4 MC/AsmParser: Fix .abort and .secure_log_unique to accept arbitrary token
sequences, not just strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108655 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 20:15:59 +00:00
Daniel Dunbar
7a570d09ac MC/AsmParser: Add macro argument substitution support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108654 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 19:00:10 +00:00
Daniel Dunbar
c64a0d7c3e MC/AsmParser: Add basic support for macro instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108653 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:54:11 +00:00
Daniel Dunbar
6d8cf082f6 MC/AsmParser: Add basic parsing support for .macro definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108652 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:47:21 +00:00
Daniel Dunbar
3c802de01a MC/AsmParser: Add .macros_{off,on} support, not that makes sense since we don't
support macros.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108649 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:38:02 +00:00
Daniel Dunbar
275ce39794 MC/AsmParser: Use Error() instead of calling PrintMessage() directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108648 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:31:45 +00:00
Daniel Dunbar
f21e4e9326 MC/AsmParser: Fix TokError() to accept a Twine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108647 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:31:42 +00:00
Daniel Dunbar
aef87e3307 MC/AsmParser: Hide the AsmParser implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:31:38 +00:00
Daniel Dunbar
9fbb37e10d MC: Move several clients to using AsmParser constructor function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:31:33 +00:00
Douglas Gregor
806de357a5 Fix struct/class mismatch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 11:47:56 +00:00
Owen Anderson
3ecdfafe3b Add a DAGCombine xform to fold away redundant float->double->float conversions around sqrt instructions.
I am assured by people more knowledgeable than me that there are no rounding issues in eliminating this.

This fixed <rdar://problem/8197504>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 08:47:54 +00:00
Lang Hames
12f35c52a5 Added -pbqp-pre-coalescing flag to PBQP. If enabled this will cause PBQP to require
LoopSplitter be run prior to register allocation.

Entirely for testing purposes at the moment.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108634 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 00:57:59 +00:00
Gabor Greif
aa7e8b27ad fullStopTag cannot happen here, it is handled above
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108631 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 20:52:46 +00:00
Bill Wendling
7490896f9d Use isPrologLabel() instead of checking the opcode directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108628 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 19:18:44 +00:00
Chris Lattner
89a902e1c2 the stackifier is global!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108626 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 17:42:04 +00:00
Chris Lattner
a40ce7e394 doxygenify some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108625 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 17:40:51 +00:00
Zhongxing Xu
d3bb335144 update CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108620 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 12:12:42 +00:00
Lang Hames
3b6702db0c Removed unused inRange variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108618 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 11:43:07 +00:00
Lang Hames
60f422f894 LoopSplitter - intended to split live intervals over loop boundaries.
Still very much under development. Comments and fixes will be forthcoming.

(This commit includes some small tweaks to LiveIntervals & LoopInfo to support the splitter)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 07:34:01 +00:00
Owen Anderson
7e3012c345 Another attempt at getting the clang self-host to like my instcombine patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108614 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 06:56:35 +00:00
Lang Hames
d0f6f01731 Iterating over sets of pointers in a heuristic was a bad idea. Switching
any command line paramater changed the register allocation produced by
PBQP.

Turns out variety is not the spice of life.

Fixed some comparators, added others. All good now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108613 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 06:31:41 +00:00
Eli Friedman
dc1ad22d53 Start of .sleb128/.uleb128 parsing support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 06:27:28 +00:00
Chris Lattner
93604b6de2 Fix PR7658, a problem where type refinement can trigger
constant replacement which was botching its handling of
types.  Use of getType() instead of getRawType() was causing
the type map in constant folding to be updated wrong.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108610 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 06:13:52 +00:00
Eli Friedman
21444efae0 Work-in-progress parsing for ELF .section directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 04:29:04 +00:00
Jim Grosbach
5423856e44 Add combiner patterns to more effectively utilize the BFI (bitfield insert)
instruction for non-constant operands. This includes the case referenced
in the README.txt regarding a bitfield copy.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108608 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 03:30:54 +00:00
Eli Friedman
f82ccf5a0d Add support for parsing .size directives for ELF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108606 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 03:09:18 +00:00
Daniel Dunbar
d1e3b44d6c MC/AsmParser: Lift Run() and TargetParser to base class.
Also, add constructor function for creating AsmParser instances.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108604 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 02:26:10 +00:00
Jim Grosbach
dd7d28a17b add BFI to getTargetNodeName()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108603 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 01:50:57 +00:00
Jim Grosbach
15a2f2eff8 Fix logic think-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108601 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 01:22:19 +00:00
Eric Christopher
697cba8ec2 Remove unnecessary check that was subsumed into canRealignStack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108588 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 00:33:04 +00:00
Eric Christopher
2b8271e029 Propagate alloca alignment information via variable size object frame
information.

No functional change yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108583 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 00:28:22 +00:00
Eric Christopher
d4c36cec1d Make more explicit and add some currently disabled error messages for
stack realignment on ARM.

Also check for function attributes as we do on X86 as well as
make explicit that we're checking can as well as needs in this function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 00:27:24 +00:00
Eric Christopher
acdb4b9203 Make comment a bit more clear as well as return statement since
needsStackRealignment is currently checking the can conditions as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 00:25:41 +00:00
Jim Grosbach
469bbdb597 Add basic support to code-gen the ARM/Thumb2 bit-field insert (BFI) instruction
and a combine pattern to use it for setting a bit-field to a constant
value. More to come for non-constant stores.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108570 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-16 23:05:05 +00:00