Dan Gohman [Wed, 1 Oct 2008 15:07:49 +0000 (15:07 +0000)]
Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56919
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 15:07:14 +0000 (15:07 +0000)]
nounwind-ify this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56918
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 1 Oct 2008 09:13:40 +0000 (09:13 +0000)]
revert the addition of Preverves(CallGraph), per Duncan's comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56917
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 04:14:30 +0000 (04:14 +0000)]
Mark CALL instructions as having a Use of ESP/RSP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56911
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 04:13:23 +0000 (04:13 +0000)]
Don't leave an output file in the test directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56910
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 02:02:03 +0000 (02:02 +0000)]
Call ScalarEvolution's deleteValueFromRecords before deleting an
instruction, not after. This fixes some uses of free'd memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56908
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 1 Oct 2008 01:02:18 +0000 (01:02 +0000)]
Moved this option to the front-end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56901
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 1 Oct 2008 00:59:58 +0000 (00:59 +0000)]
Implement the -fno-builtin option in the front-end, not in the back-end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56900
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 00:25:38 +0000 (00:25 +0000)]
Use explicit target-triples to unbreak this test on non-darwin systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56896
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 30 Sep 2008 23:58:47 +0000 (23:58 +0000)]
Mark merged-in VNInfo's as being PHIKilled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56893
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 30 Sep 2008 22:51:54 +0000 (22:51 +0000)]
Fix a simple error in renumbering kill markaers, that took an inordinant amount of time to track down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56889
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Sep 2008 22:05:33 +0000 (22:05 +0000)]
Just don't transform this memset into "bzero" if no-builtin is specified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56888
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 30 Sep 2008 22:04:30 +0000 (22:04 +0000)]
add preserversCFG() + preservers(CallGraph)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56887
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Sep 2008 21:40:30 +0000 (21:40 +0000)]
- Initialize "--no-builtin" to "false".
- Testcase for r56885.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56886
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Sep 2008 21:22:07 +0000 (21:22 +0000)]
Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
`-fno-builtin' flag. Currently, it's used to replace "memset" with "_bzero"
instead of "__bzero" on Darwin10+. This arguably violates the meaning of this
flag, but is currently sufficient. The meaning of this flag should become more
specific over time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56885
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Sep 2008 20:48:29 +0000 (20:48 +0000)]
Move the primary fast-isel top-level comments to FastISel.cpp, where
they'll be a little more visible. Also, update and reword them a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56877
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 30 Sep 2008 18:34:38 +0000 (18:34 +0000)]
add AU.setPreservesCFG() since this pass only adds and removes function attributes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56868
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Sep 2008 18:30:35 +0000 (18:30 +0000)]
Optimize SelectionDAG's AssignTopologicalOrder even further.
Completely eliminate the TopOrder std::vector. Instead, sort
the AllNodes list in place. This also eliminates the need to
call AllNodes.size(), a linear-time operation, before
performing the sort.
Also, eliminate the Sources temporary std::vector, since it
essentially duplicates the sorted result as it is being
built.
This also changes the direction of the topological sort
from bottom-up to top-down. The AllNodes list starts out in
roughly top-down order, so this reduces the amount of
reordering needed. Top-down is also more convenient for
Legalize, and ISel needed only minor adjustments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56867
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 30 Sep 2008 18:15:04 +0000 (18:15 +0000)]
ignore generated files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56866
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 30 Sep 2008 15:51:21 +0000 (15:51 +0000)]
Add runStaticConstructorsDestructors which runs ctors / dtors of a single module. Patch by David Chisnall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56849
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 30 Sep 2008 15:44:16 +0000 (15:44 +0000)]
Re-apply 56835 along with header file changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56848
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 30 Sep 2008 15:18:29 +0000 (15:18 +0000)]
Stacker is dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56844
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 30 Sep 2008 10:00:30 +0000 (10:00 +0000)]
Revert commit 56835 since it breaks the build.
"If a re-materializable instruction has a register
operand, the spiller will change the register operand's
spill weight to HUGE_VAL to avoid it being spilled.
However, if the operand is already in the queue ready
to be spilled, avoid re-materializing it".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56837
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 30 Sep 2008 06:36:58 +0000 (06:36 +0000)]
If a re-materializable instruction has a register operand, the spiller will change the register operand's spill weight to HUGE_VAL to avoid it being spilled. However, if the operand is already in the queue ready to be spilled, avoid re-materializing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56835
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 30 Sep 2008 06:08:34 +0000 (06:08 +0000)]
Fix misoptimization of: xor i1 (icmp eq (X, C1), icmp s[lg]t (X, C2))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56834
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Sep 2008 01:21:32 +0000 (01:21 +0000)]
Fix X86FastISel's output for x86-32 PIC constant pool addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56829
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Sep 2008 00:58:23 +0000 (00:58 +0000)]
Move the GlobalBaseReg field out of X86ISelDAGToDAG.cpp
and X86FastISel.cpp into X86MachineFunction.h, so that it
can be shared, instead of having each selector keep track
of its own.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56825
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Sep 2008 00:48:39 +0000 (00:48 +0000)]
Disable all x87 usage, including f32 and f64 when the subtarget
doesn't have SSE(2), with X86FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56823
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 29 Sep 2008 22:25:26 +0000 (22:25 +0000)]
Remove misuse of ReplaceNodeResults for atomics with
valid types. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56808
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 29 Sep 2008 21:55:50 +0000 (21:55 +0000)]
Fix FastISel to not initialize the PIC-base register multiple times
in functions with PIC references from more than one basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56807
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 29 Sep 2008 21:13:15 +0000 (21:13 +0000)]
Fix an over-pessimization about GlobalVariable addresses in X86FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56802
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 29 Sep 2008 20:49:50 +0000 (20:49 +0000)]
Support inreg, zext and sext as return value attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56801
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 29 Sep 2008 18:34:44 +0000 (18:34 +0000)]
Fix grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56796
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 29 Sep 2008 18:16:38 +0000 (18:16 +0000)]
Fix grammer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56795
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 29 Sep 2008 18:16:09 +0000 (18:16 +0000)]
Fix sentence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56794
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 29 Sep 2008 17:26:18 +0000 (17:26 +0000)]
Fix PR2835. Do not change the width of a volatile load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56792
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Sep 2008 14:59:04 +0000 (14:59 +0000)]
Speed up these passes when the callgraph has
huge simply connected components. Suggested
by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56787
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 29 Sep 2008 14:40:32 +0000 (14:40 +0000)]
remove redundant test (mayBeOverriden() includes hasLinkOnceLinkage)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56786
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Sep 2008 13:35:31 +0000 (13:35 +0000)]
Tweak some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56784
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Mon, 29 Sep 2008 11:52:22 +0000 (11:52 +0000)]
Add some hands-on documentation about which files to create and edit when
adding a backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56783
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Sep 2008 11:25:42 +0000 (11:25 +0000)]
Rename isWeakForLinker to mayBeOverridden. Use it
instead of hasWeakLinkage in a bunch of optimization
passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56782
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Mon, 29 Sep 2008 10:42:13 +0000 (10:42 +0000)]
Add a testcase showing that scalarrepl supports first class structs.
I originally made this script to show that scalarrepl didn't support them, but
it turned out it does. Better to still add the testcase then.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56781
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 27 Sep 2008 23:53:14 +0000 (23:53 +0000)]
Move the code that handles DAGISel error conditions into
helper functions instead of duplicating it inline each time
it is needed. This eliminates a few hundred or so copies
of this code in each target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56759
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 27 Sep 2008 23:22:55 +0000 (23:22 +0000)]
Add IRBuilder::{CreateIsNull, CreateIsNonNull} helper methods.
- I'm open to the idea that these could have better names. I think
these read better than CreateEQNull and CreateNENull.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56757
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 27 Sep 2008 01:56:22 +0000 (01:56 +0000)]
Re-apply 56683 with fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56748
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 27 Sep 2008 00:25:28 +0000 (00:25 +0000)]
Update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56730
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 27 Sep 2008 00:22:09 +0000 (00:22 +0000)]
Unbreak build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56727
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 27 Sep 2008 00:08:24 +0000 (00:08 +0000)]
Add missing #include for asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56718
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 26 Sep 2008 23:51:19 +0000 (23:51 +0000)]
Implement function notes as function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56716
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 26 Sep 2008 23:46:20 +0000 (23:46 +0000)]
Generated files for warning fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56715
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 26 Sep 2008 23:45:53 +0000 (23:45 +0000)]
Fix a compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56714
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 Sep 2008 23:41:32 +0000 (23:41 +0000)]
Implement "punpckldq %xmm0, $xmm0" as "pshufd $0x50, %xmm0, %xmm" unless optimizing for code size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56711
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 26 Sep 2008 22:53:05 +0000 (22:53 +0000)]
Now Attributes are divided in three groups
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn
Return attributes use 0 as the index.
Function attributes use ~0U as the index.
This patch requires corresponding changes in llvm-gcc and clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56704
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 26 Sep 2008 22:10:44 +0000 (22:10 +0000)]
Temporarily reverting r56683. This is causing a failure during the build of llvm-gcc:
/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -mmacosx-version-min=10.4 -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Gir/devel/llvm/clean/llvm.obj/include -I/Volumes/Gir/devel/llvm/clean/llvm.src/include -fexceptions -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc.src/gcc/unwind-dw2-fde-darwin.c -o libgcc/./unwind-dw2-fde-darwin.o
Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) && TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical register live information"), function runOnMachineFunction, file /Volumes/Gir/devel/llvm/clean/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp, line 311.
../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
{standard input}:3521:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb"
{standard input}:3521:symbol: "_dwarf_reg_size_table" can't be undefined in a subtraction expression
{standard input}:3520:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb"
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56703
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 26 Sep 2008 22:02:59 +0000 (22:02 +0000)]
Fix missing whitespace in the printing of function notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56702
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 26 Sep 2008 21:54:37 +0000 (21:54 +0000)]
Rename ConstantSDNode's getSignExtended to getSExtValue, for
consistancy with ConstantInt, and re-implement it in terms
of ConstantInt's getSExtValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56700
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 26 Sep 2008 21:38:45 +0000 (21:38 +0000)]
Make some minor reorganizations and comment changes to eliminate trivial
differences between the CallInst and InvokeInst classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56699
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 26 Sep 2008 21:30:20 +0000 (21:30 +0000)]
Mark lea fi# as being really rematerializable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56698
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 Sep 2008 21:26:30 +0000 (21:26 +0000)]
unpckhps requires sse1, punpckhdq requires sse2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56697
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 26 Sep 2008 21:12:29 +0000 (21:12 +0000)]
Update LICENSE link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56689
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 26 Sep 2008 20:04:15 +0000 (20:04 +0000)]
Fix X86FastISel's address folding to check displacement
values for overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56686
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 Sep 2008 19:48:35 +0000 (19:48 +0000)]
Fix @llvm.frameaddress codegen. FP elimination optimization should be disabled when frame address is desired. Also add support for depth > 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56683
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Fri, 26 Sep 2008 19:48:03 +0000 (19:48 +0000)]
CMake: Builds all examples. Corrected name of CBackend target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56682
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 26 Sep 2008 19:32:34 +0000 (19:32 +0000)]
Generated files for previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56679
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 26 Sep 2008 19:31:53 +0000 (19:31 +0000)]
Another file I forgot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56678
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 26 Sep 2008 19:31:26 +0000 (19:31 +0000)]
Add "inreg" field to CallSDNode (doesn't increase
its size). Adjust various lowering functions to
pass this info through from CallInst. Use it to
implement sseregparm returns on X86. Remove
X86_ssecall calling convention.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56677
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 26 Sep 2008 19:15:30 +0000 (19:15 +0000)]
Factor out the code for determining when symblic addresses
require RIP-relative addressing and use it to fix a bug
in X86FastISel in x86-64 PIC mode, where it was trying to
use base/index registers with RIP-relative addresses. This
fixes a bunch of x86-64 testsuite failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56676
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 Sep 2008 19:14:21 +0000 (19:14 +0000)]
Avoid spilling EBP / RBP twice in the prologue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56675
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 26 Sep 2008 18:50:46 +0000 (18:50 +0000)]
We don't need to insert copies for implicit_def's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56674
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 26 Sep 2008 17:27:58 +0000 (17:27 +0000)]
When looking for executable extensions, ignore .dSYM, as that's the debug info directory on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56667
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 Sep 2008 16:58:16 +0000 (16:58 +0000)]
X86 address displacement field must be interpreted as a 32-bit value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56665
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 26 Sep 2008 04:50:04 +0000 (04:50 +0000)]
Set svn:ignore on AsmPrinter Release-Asserts directories.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56643
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Fri, 26 Sep 2008 04:40:32 +0000 (04:40 +0000)]
CMake: Builds all targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56641
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 26 Sep 2008 01:39:32 +0000 (01:39 +0000)]
Disable support for x86_f80 in X86FastISel. Supporting it would
require more work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56637
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 26 Sep 2008 00:28:12 +0000 (00:28 +0000)]
If we have a function with an unreachable statement such that the ending debug
information is in an unreachable block, then it's possible that the high/low pc
values won't be set for the dwarf information. E.g., this function:
void abort(void) __attribute__((__noreturn__));
void dead_beef(void) __attribute__ ((noreturn));
int *b;
void dead_beef(void) {
*b=0xdeadbeef;
abort();
}
has a call to "@llvm.dbg.region.end" only in the unreachable block:
define void @dead_beef() noreturn nounwind {
entry:
call void @llvm.dbg.func.start(...)
call void @llvm.dbg.stoppoint(...)
...
call void @abort( ) noreturn nounwind
unreachable
return: ; No predecessors!
call void @llvm.dbg.stoppoint(...)
call void @llvm.dbg.region.end(...)
ret void
}
The dwarf information emitted is something like:
0x00000084: TAG_subprogram [5]
AT_name( "dead_beef" )
AT_external( 0x01 )
AT_prototyped( 0x01 )
AT_decl_file( 0x01 )
AT_decl_line( 0x08 )
Note that this is *not* the best fix for this problem, but a band-aid for an
gaping wound. This code needs to be changed when we revamp our debugging
information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56628
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 Sep 2008 23:35:16 +0000 (23:35 +0000)]
Prefer movlhps over punpcklqdq, etc. in more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56627
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Sep 2008 23:34:02 +0000 (23:34 +0000)]
Fix a bug in which address displacements were being added to the
load from the stub, instead of the result of the load from the stub.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56626
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 25 Sep 2008 22:42:01 +0000 (22:42 +0000)]
Make pointer parameter const for isUsedInBasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56625
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 25 Sep 2008 21:00:45 +0000 (21:00 +0000)]
Large mechanical patch.
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 25 Sep 2008 21:00:33 +0000 (21:00 +0000)]
Reapply 56585:56589 with proper fix for some gcc versions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56621
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 Sep 2008 20:50:48 +0000 (20:50 +0000)]
With sse3 and when the source is a load or has multiple uses, favors movddup over shuffp*, pshufd, etc. Without sse3 or when the source is from a register, make use of movlhps
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56620
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 25 Sep 2008 20:47:45 +0000 (20:47 +0000)]
Accept 'inreg' attribute on x86 functions as
meaning sse_regparm (i.e. float/double values go
in XMM0 instead of ST0). Update documentation
to reflect reality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56619
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Sep 2008 17:37:20 +0000 (17:37 +0000)]
Avoid a spurious extra space character when printing empty structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56616
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Sep 2008 17:22:52 +0000 (17:22 +0000)]
Support for i1 XOR in FastISel. It is actually safe because
i1 operands are assumed to already by zero-extended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56615
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Sep 2008 17:21:42 +0000 (17:21 +0000)]
Don't print fast-isel debug messages by default. Thanks Chris!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56614
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Sep 2008 17:17:27 +0000 (17:17 +0000)]
Don't forget the newline in debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56613
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Sep 2008 17:05:24 +0000 (17:05 +0000)]
FastISel support for debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56610
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Pennington [Thu, 25 Sep 2008 16:15:10 +0000 (16:15 +0000)]
bug 2812: Segmentation fault on a big emdiam processor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56609
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Sep 2008 15:24:26 +0000 (15:24 +0000)]
PIC support in X86FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56608
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 Sep 2008 07:38:08 +0000 (07:38 +0000)]
Temporarily backing out 56585:56589 to unbreak the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56607
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Sep 2008 01:28:51 +0000 (01:28 +0000)]
Fix a recent fast-isel coverage regression - don't bail out before
giving the target a chance to materialize constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56605
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Sep 2008 01:14:49 +0000 (01:14 +0000)]
Enable DeadMachineInstructionElim when Fast-ISel is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56604
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Sep 2008 01:06:50 +0000 (01:06 +0000)]
Add debug output to this pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56602
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 Sep 2008 00:49:51 +0000 (00:49 +0000)]
pmovsxbq etc. requires sse4.1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56600
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Sep 2008 00:37:07 +0000 (00:37 +0000)]
Refactor the code that adds standard LLVM codegen passes into
a separate function, eliminating duplication between the
add-passes-for-file and add-passes-for-machine-code code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56599
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 Sep 2008 00:14:04 +0000 (00:14 +0000)]
<rdar://problem/
6234798> Assertion failed: (!OpInfo.AssignedRegs.Regs.empty() && "Couldn't allocate input reg!")
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56597
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 24 Sep 2008 23:44:12 +0000 (23:44 +0000)]
Give LowerSubregs.cpp a top-level description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56596
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 24 Sep 2008 23:27:55 +0000 (23:27 +0000)]
Fix patterns for SSE4.1 move and sign extend instructions. Also add instructions which fold VZEXT_MOVL and VZEXT_LOAD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56594
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 24 Sep 2008 23:26:36 +0000 (23:26 +0000)]
X86ISD::VZEXT_LOAD should produce and fold a chain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56593
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 24 Sep 2008 23:13:09 +0000 (23:13 +0000)]
Remove SelectionDag early allocation of registers
for earlyclobbers. Teach Local RA about earlyclobber,
and add some tests for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56592
91177308-0d34-0410-b5e6-
96231b3b80d8