Commit Graph

8854 Commits

Author SHA1 Message Date
Dan Gohman
36b5c1338a Rename MemOperand to MachineMemOperand. This was suggested by
review feedback from Chris quite a while ago. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49348 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 19:35:22 +00:00
Roman Levenstein
dc1adac582 Re-commit of the r48822, where the infinite looping problem discovered
by Dan Gohman is fixed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49330 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 10:06:32 +00:00
Gabor Greif
051a950000 API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 20:25:17 +00:00
Evan Cheng
0c0f83ff5d Favors pshufd over shufps when shuffling elements from one vector. pshufd is faster than shufps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49244 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-05 00:30:36 +00:00
Torok Edwin
3e3dc57d3f strdup needs <cstring>. This fixes a build error with g++-4.3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49218 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 16:08:00 +00:00
Evan Cheng
43b7ca15a3 Re-enable SSE4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49158 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 08:53:29 +00:00
Evan Cheng
ab394bdcc0 Fix x86-64 encoding bug. REX prefix must always follow 0x0F prefix. For example, extractps in 64bit mode: 66 REX 0F 3A 17, not 66 0F 3A REX 17.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49157 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 08:53:17 +00:00
Evan Cheng
90ce87b5bd Cosmetic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49156 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 07:45:18 +00:00
Evan Cheng
b4e56d4a2b Temporarily disabling SSE4 until we fix the encoding issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49129 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 04:49:54 +00:00
Evan Cheng
6397c64441 Backing out 48222 temporarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49124 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 03:13:16 +00:00
Dan Gohman
271515a46d Suppress the 128-bit integer typedef on 32-bit targets, because
it causes compile errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49122 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 23:52:49 +00:00
Dan Gohman
d761480fe4 Partial CBackend support for 128-bit integers. This is needed
now that llvm-gcc is lowering appropriately-sized struct returns
to i128 on x86-64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49109 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 19:40:14 +00:00
Dale Johannesen
e00406281d Cosmetic changes per EH patch review feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49096 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 17:04:45 +00:00
Anton Korobeynikov
67073f1cbd Add new CC lowering rule: provide a list of registers, which can be 'shadowed',
when some another register is used for argument passing.
Currently is used on Win64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49079 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 05:23:57 +00:00
Dale Johannesen
1532f3ddd7 Recommitting EH patch; this should answer most of the
review feedback.
-enable-eh is still accepted but doesn't do anything.
EH intrinsics use Dwarf EH if the target supports that,
and are handled by LowerInvoke otherwise.
The separation of the EH table and frame move data is,
I think, logically figured out, but either one still
causes full EH info to be generated (not sure how to
split the metadata correctly).
MachineModuleInfo::needsFrameInfo is no longer used and
is removed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49064 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 00:25:04 +00:00
Evan Cheng
ffe2eb0120 ReMat of load from stub in pic mode extends the life of pic base. Currently spiller doesn't do a good job of estimating the impact. Disable for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49059 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 23:26:12 +00:00
Evan Cheng
247faffb32 Remove unnecessary and non-deterministic checking code. Re-enable remat of load from gv stub.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49054 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 21:38:20 +00:00
Dan Gohman
38c92263eb Don't use __bzero for memset if the second argument isn't zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49050 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 20:56:18 +00:00
Dan Gohman
68d599df37 Speculatively micro-optimize memory-zeroing calls on Darwin 10.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49048 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 20:38:36 +00:00
Dale Johannesen
b6d5b14390 Revert 49006 for the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49046 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 20:00:57 +00:00
Evan Cheng
78b6ce3981 Disabling remat of load from gv stub (temporarily) again to fix llvmgcc bootstrap miscompare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49037 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 07:33:13 +00:00
Evan Cheng
110cf48752 Unbreak ARM / Thumb soft FP support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49012 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 01:50:16 +00:00
Dale Johannesen
2ffbcaccd1 Accept 'y' constraint (MMX) in inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49011 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 00:57:48 +00:00
Dale Johannesen
1544e4713b Emit exception handling info for functions which are
not marked nounwind, or for all functions when -enable-eh
is set, provided the target supports Dwarf EH.

llvm-gcc generates nounwind in the right places; other FEs
will need to do so also.  Given such a FE, -enable-eh should
no longer be needed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49006 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 23:40:23 +00:00
Evan Cheng
427f4c106a It's not safe to fold a load from GV stub or constantpool into a two-address use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49002 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 23:19:51 +00:00
Evan Cheng
ca1267c02b Move reMaterialize() from TargetRegisterInfo to TargetInstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48995 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 20:40:39 +00:00
Evan Cheng
9d15abe838 Re-apply 48911.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48977 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 07:54:19 +00:00
Nick Lewycky
8dd6505868 Moved from PR1570.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48965 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-30 19:07:11 +00:00
Chris Lattner
d27c991ceb Fix "Control reaches the end of non-void function" warnings,
patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48963 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-30 18:22:13 +00:00
Dan Gohman
d4a2ad35e3 Fix a tokenfactor node to use the load chain rather than the
load value. This fixes PR2177.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48932 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 23:45:16 +00:00
Evan Cheng
4db4f1ce7e Backing out 48911 for now. It's breaking stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48922 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 17:49:06 +00:00
Evan Cheng
ddf0a06580 New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48912 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 07:07:06 +00:00
Evan Cheng
86f57b0983 Load from stub is already re-materializable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48911 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 06:49:25 +00:00
Evan Cheng
e3d8dbf479 Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48856 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 01:45:11 +00:00
Evan Cheng
e771ebd7a3 Allow certain lea instructions to be rematerialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48855 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 01:41:09 +00:00
Evan Cheng
d1e4b3515c Remove an unused command line option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48854 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 01:30:24 +00:00
Roman Levenstein
e326332acd Use a linked data structure for the uses lists of an SDNode, just like
LLVM Value/Use does and MachineRegisterInfo/MachineOperand does.
This allows constant time for all uses list maintenance operations.

The idea was suggested by Chris. Reviewed by Evan and Dan.
Patch is tested and approved by Dan.

On normal use-cases compilation speed is not affected. On very big basic
blocks there are compilation speedups in the range of 15-20% or even better. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48822 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 12:39:26 +00:00
Evan Cheng
7aae876db1 Fix some SSE4.1 instruction encoding bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48815 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 08:11:49 +00:00
Dale Johannesen
27c31054ec Use ## for comment delimiter on darwin x86-32, so
llvm's output .s files will go through gcc -std=c99
without triggering preprocesser errors.  Approach
suggested by Daveed Vandevoorde.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48808 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 23:29:30 +00:00
Evan Cheng
e22e62b5c0 Smaller function alignment when optimizing for size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48805 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 22:29:46 +00:00
Evan Cheng
2659343f04 Rename option -optimizefor-size to -optimize-size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48804 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 22:28:39 +00:00
Dan Gohman
950a4c40b8 Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48801 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 22:06:05 +00:00
Dan Gohman
cfbb2f074d A quick nm audit turned up several fixed tables and objects that were
marked read-write. Use const so that they can be allocated in a
read-only segment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48800 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 21:45:14 +00:00
Devang Patel
55c666a867 Add optimize-for-size knob.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48793 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 21:02:35 +00:00
Dan Gohman
27845362d9 Add CMP32mr and friends to the load-unfolding table. Among
other things, this allows the scheduler to unfold a load operand
in the 2008-01-08-SchedulerCrash.ll testcase, so it now successfully
clones the comparison to avoid a pushf+popf.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48777 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 16:53:19 +00:00
Evan Cheng
066114555d Add \t after .set. Fix by Jay Freeman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48753 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 23:36:49 +00:00
Bill Wendling
3e98c30cf5 Use the bit size of the operand instead of the hard-coded 32 to generate the
mask.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48750 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 23:16:37 +00:00
Evan Cheng
62a3f1538c - SSE4.1 extractfps extracts a f32 into a gr32 register. Very useful! Not. Fix the instruction specification and teaches lowering code to use it only when the only use is a store instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48746 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 21:52:23 +00:00
Evan Cheng
3d5cd6118d Remove duplicated entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48714 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-23 22:56:07 +00:00
Anton Korobeynikov
82818eb223 Minor typo fixes. Also add another FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48710 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-23 20:32:06 +00:00