Bill Wendling [Fri, 3 Oct 2008 00:26:49 +0000 (00:26 +0000)]
Unbreak the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56988
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 3 Oct 2008 00:07:11 +0000 (00:07 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56986
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 2 Oct 2008 22:56:44 +0000 (22:56 +0000)]
Add support for Canadian Cross builds where the host executables are not
runnable on the build machine.
There are a few bits that need built for the build environment (TableGen).
This patch builds those bits, and the associated libraries, for the build
environment as well as the (usual) host environment.
Thanks to Eric C. and Devang P. for pre-commit review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56975
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Thu, 2 Oct 2008 22:41:42 +0000 (22:41 +0000)]
Fix build breakage.
Forgot to include Makefile.plugins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56970
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 2 Oct 2008 22:15:21 +0000 (22:15 +0000)]
Optimize conditional branches in X86FastISel. This replaces
sequences like this:
sete %al
testb %al, %al
jne LBB11_1
with this:
je LBB11_1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56969
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 2 Oct 2008 22:09:09 +0000 (22:09 +0000)]
Add a new MachineBasicBlock utility function, isLayoutSuccessor, that
can be used when deciding if a block can transfer control to another
via a fall-through instead of a branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56968
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Thu, 2 Oct 2008 21:15:05 +0000 (21:15 +0000)]
Build system tweaks to make it more convenient for the plugin authors.
Plugins can be now compiled in with a slight Makefile change.
For example, to compile the new Clang driver, use:
cd $LLVMC2_DIR
make TOOLNAME=ccc2 BUILTIN_PLUGINS=Clang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56967
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Thu, 2 Oct 2008 20:15:08 +0000 (20:15 +0000)]
fix build gcc 4.3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56965
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 2 Oct 2008 19:40:33 +0000 (19:40 +0000)]
Use a multimap rather than a map for holding the list of copies to insert, so we don't lose copies when two of them have
the same source. I don't know what I was thinking when I wrote this originally.
Note: There's probably a more efficient way to do this, but I need to think about it some more, and about what determinism
guarantees need to be present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56964
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 2 Oct 2008 18:53:47 +0000 (18:53 +0000)]
Handle some 64-bit atomics on x86-32, some of the time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56963
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 2 Oct 2008 18:39:11 +0000 (18:39 +0000)]
Avoid name shadowing with E variable defined in for(). This was giving VC++
grief.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56961
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 2 Oct 2008 18:38:23 +0000 (18:38 +0000)]
Remove redundant check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56960
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 2 Oct 2008 18:29:27 +0000 (18:29 +0000)]
A Partitioned Boolean Quadratic Programming (PBQP) based register allocator.
Contributed by Lang Hames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56959
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Thu, 2 Oct 2008 17:39:29 +0000 (17:39 +0000)]
CMake: Added Host.cpp to lib/System/CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56957
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 2 Oct 2008 17:05:03 +0000 (17:05 +0000)]
Rename IRBuilder::IsNonNull -> IsNotNull in response to feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56953
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 2 Oct 2008 15:04:30 +0000 (15:04 +0000)]
Fix a think-o in isSafeToMove. This fixes it from thinking that
volatile memory references are safe to move.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56948
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 2 Oct 2008 14:56:12 +0000 (14:56 +0000)]
Work around an interaction between fast-isel and regalloc=local. The
local register allocator's physreg liveness doesn't recognize subregs,
so it doesn't know that defs of %ecx that are immediately followed by
uses of %cl aren't dead. This comes up due to the way fast-isel emits
shift instructions.
This is a temporary workaround. Arguably, local regalloc should
handle subreg references correctly. On the other hand, perhaps
fast-isel should use INSERT_SUBREG instead of just assigning to the
most convenient super-register of %cl when lowering shifts.
This fixes MultiSource/Benchmarks/MallocBench/espresso,
MultiSource/Applications/hexxagon, and others, under -fast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56947
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 2 Oct 2008 05:56:52 +0000 (05:56 +0000)]
"The original bug was a complaint that _mm_srli_si128 mis-compiled when passed
a constant vector ("{0x123, 0x456}" syntax). The fix is to simplify the
_mm_srli_si128 macro, and move the "* 8" from the macro into the compiler
back-end. I can't change the existing __builtins because so many people are
using them :-(."
Patch by Stuart Hastings!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56944
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 2 Oct 2008 01:17:28 +0000 (01:17 +0000)]
Add llvm::sys::{osName,osVersion} for retrieving operating system name
& version as strings.
- Win32 code is untested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56942
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 23:48:35 +0000 (23:48 +0000)]
Disable fast-isel for this test, as it doesn't emit the same
number of instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56940
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 1 Oct 2008 23:41:25 +0000 (23:41 +0000)]
Attributes noinline alwaysinline are incompatible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56939
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 1 Oct 2008 23:18:38 +0000 (23:18 +0000)]
Remove OptimizeForSize global. Use function attribute optsize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56937
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 20:39:19 +0000 (20:39 +0000)]
Enable FastISel by default (on x86 and x86-64) with the -fast option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56930
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 1 Oct 2008 20:16:19 +0000 (20:16 +0000)]
add a new form of Type::dump that takes a module for type names,
patch provided by Tomas Lindquist Olsen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56929
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 19:58:59 +0000 (19:58 +0000)]
Make some implicit conversions explicit, to avoid compiler warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56927
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 19:46:30 +0000 (19:46 +0000)]
Split this test and move it into target-specific directories.
This fixes failures on configurations that don't have one or the
other targets enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56926
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 18:28:06 +0000 (18:28 +0000)]
Split x86's ADJCALLSTACK instructions into 32-bit and 64-bit forms.
This allows the 64-bit forms to use+def RSP instead of ESP. This
doesn't fix any real bugs today, but it is more precise and it
makes the debug dumps on x86-64 look more consistent.
Also, add some comments describing the CALL instructions' physreg
operand uses and defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56925
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 1 Oct 2008 18:16:49 +0000 (18:16 +0000)]
Fix typo s/ther/there/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56924
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 1 Oct 2008 15:25:41 +0000 (15:25 +0000)]
Factorize code: remove variants of "strip off
pointer bitcasts and GEP's", and centralize the
logic in Value::getUnderlyingObject. The
difference with stripPointerCasts is that
stripPointerCasts only strips GEPs if all
indices are zero, while getUnderlyingObject
strips GEPs no matter what the indices are.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56922
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 15:11:19 +0000 (15:11 +0000)]
Fold trivial two-operand tokenfactors where the operands are equal
immediately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56921
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 1 Oct 2008 15:09:37 +0000 (15:09 +0000)]
Don't prepend a space character for constants in Value::print.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56920
91177308-0d34-0410-b5e6-
96231b3b80d8
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