Anton Korobeynikov
088ebede53
Honour relocation behaviour stuff for ro objects
...
llvm-svn: 68005
2009-03-29 17:13:49 +00:00
Anton Korobeynikov
7437b59caf
Extend the relocation tracker handler, so we can filter on different 'kinds' of relocations required.
...
llvm-svn: 68004
2009-03-29 17:13:18 +00:00
Duncan Sands
d21581eaa1
Fix PR3899: add support for extracting floats from vectors
...
when using -soft-float.
Based on a patch by Jakob Stoklund Olesen.
llvm-svn: 67996
2009-03-29 13:51:06 +00:00
Chris Lattner
6694cdf215
add missing space.
...
llvm-svn: 67995
2009-03-29 13:26:05 +00:00
Chris Lattner
5b52baeeef
add some comments, add a dyn_cast method.
...
llvm-svn: 67992
2009-03-29 07:03:30 +00:00
Chris Lattner
e50f47971b
When forming sentinels for empty/tombstone, make sure to respect the
...
pointer's expected number of zero low-bits.
This should fix the breakage I introduced recently.
llvm-svn: 67990
2009-03-29 06:33:22 +00:00
Chris Lattner
3a6dc751ac
add helper method.
...
llvm-svn: 67989
2009-03-29 06:32:46 +00:00
Chris Lattner
a9c6de15fb
Add a simple type-safe bit-mangling pointer union class. This allows
...
you to do things like:
/// PointerUnion<int*, float*> P;
/// P = (int*)0;
/// printf("%d %d", P.is<int*>(), P.is<float*>()); // prints "1 0"
/// X = P.get<int*>(); // ok.
/// Y = P.get<float*>(); // runtime assertion failure.
/// Z = P.get<double*>(); // does not compile.
/// P = (float*)0;
/// Y = P.get<float*>(); // ok.
/// X = P.get<int*>(); // runtime assertion failure.
llvm-svn: 67987
2009-03-29 06:06:02 +00:00
Chris Lattner
35c0232cb0
Allow a specific PointerIntPair instance to use a specific Pointer trait:
...
some pointer instances have properties that not all of a type have.
llvm-svn: 67986
2009-03-29 06:02:20 +00:00
Chris Lattner
d4ff5fce81
Add a PointerLikeTypeTraits specialization for uintptr_t
...
llvm-svn: 67985
2009-03-29 06:00:21 +00:00
Chris Lattner
9bb25a192a
Value* only has 2 bits free as well.
...
llvm-svn: 67984
2009-03-29 05:45:43 +00:00
Chris Lattner
eb71b17705
Replace the PointerLikeTypeTraits::getNumLowBitsAvailable
...
function with a new NumLowBitsAvailable enum, which makes the
value available as an integer constant expression.
Add PointerLikeTypeTraits specializations for Instruction* and
Use** since they are only guaranteed 4-byte aligned.
Enhance PointerIntPair to know about (and enforce) the alignment
specified by PointerLikeTypeTraits. This should allow things
like PointerIntPair<PointerIntPair<void*, 1,bool>, 1, bool>
because the inner one knows that 2 low bits are free.
llvm-svn: 67979
2009-03-29 04:32:37 +00:00
Chris Lattner
a00f0d7e4c
rename PointerLikeTypeInto to PointerLikeTypeTraits, add trait for
...
# low bits free, and move to its own header.
llvm-svn: 67973
2009-03-29 00:39:30 +00:00
Chris Lattner
8eda11bd9d
now that you can put a PointerIntPair in a SmallPtrSet, remove some
...
hackish workarounds from memdep
llvm-svn: 67971
2009-03-29 00:24:04 +00:00
Chris Lattner
dc2999b4df
teach SmallPtrSet that PointerIntPair is "basically a pointer".
...
llvm-svn: 67970
2009-03-29 00:18:42 +00:00
Chris Lattner
356d974a93
add a note
...
llvm-svn: 67953
2009-03-28 19:26:55 +00:00
Rafael Espindola
1f11c3c36f
Use array_lengthof
...
llvm-svn: 67950
2009-03-28 19:02:18 +00:00
Rafael Espindola
6ff3dabbb4
Have only one definition of X86AddrNumOperands.
...
llvm-svn: 67949
2009-03-28 18:55:31 +00:00
Rafael Espindola
c2a17d3022
Make code a bit less brittle by no hardcoding the number
...
of operands in an address in so many places.
llvm-svn: 67945
2009-03-28 17:03:24 +00:00
Arnold Schwaighofer
e622cbf385
Make check in CheckTailCallReturnConstraints for ignorable instructions between
...
a CALL and a RET node more generic. Add a test for tail calls with a void
return.
llvm-svn: 67943
2009-03-28 12:36:29 +00:00
Bill Wendling
c619aaf122
Update the Visual Studio docs. Patch by Stefanus!
...
llvm-svn: 67940
2009-03-28 10:24:15 +00:00
Arnold Schwaighofer
83d5420d02
Enable tail call optimization for functions that return a struct (bug 3664) and for functions that return types that need extending (e.g i1).
...
llvm-svn: 67934
2009-03-28 08:33:27 +00:00
Chris Lattner
0527eda02e
declare everything as class to avoid angering the VC++ gods.
...
llvm-svn: 67931
2009-03-28 07:48:03 +00:00
Chris Lattner
dec48eab86
add a traits class for SmallPtrSet that allows us to stick things that are
...
"basically pointers" into it.
llvm-svn: 67930
2009-03-28 07:44:53 +00:00
Evan Cheng
fd81c73cde
Optimize some 64-bit multiplication by constants into two lea's or one lea + shl since imulq is slow (latency 5). e.g.
...
x * 40
=>
shlq $3, %rdi
leaq (%rdi,%rdi,4), %rax
This has the added benefit of allowing more multiply to be folded into addressing mode. e.g.
a * 24 + b
=>
leaq (%rdi,%rdi,2), %rax
leaq (%rsi,%rax,8), %rax
llvm-svn: 67917
2009-03-28 05:57:29 +00:00
Chris Lattner
7516668998
move a large method out of line.
...
llvm-svn: 67892
2009-03-28 02:08:47 +00:00
Dan Gohman
2785e4be37
Fix what surely must be a copy+pasto.
...
llvm-svn: 67881
2009-03-27 23:55:04 +00:00
Dan Gohman
6d75876473
Initialize LiveOutInfo's APInt members to zero, as APInt's
...
default constructor produces an uninitialized APInt.
This fixes PR3896.
llvm-svn: 67879
2009-03-27 23:51:02 +00:00
Jim Grosbach
669f1d0b0b
remove trailing whitespace
...
llvm-svn: 67874
2009-03-27 23:06:27 +00:00
Gabor Greif
41c8515b1b
"ghostify" the ilist<Function> sentinel
...
llvm-svn: 67872
2009-03-27 22:28:33 +00:00
Mike Stump
ced6a2be04
Allow invertable -xno- style optins as well.
...
llvm-svn: 67862
2009-03-27 20:12:55 +00:00
Dan Gohman
8680802b1f
Revert r67844. This fixes the llvm-gcc-4.2 build on Darwin.
...
llvm-svn: 67856
2009-03-27 18:37:13 +00:00
Julien Lerouge
15833b93cf
Fix build on MacOS 10.4 systems (suggested by Mike Smith).
...
llvm-svn: 67855
2009-03-27 18:18:00 +00:00
Dan Gohman
3f50cb6cd4
Fix this test so that it doesn't spuriously fail due to some
...
unrelated debugging output happening to contain the string "store".
llvm-svn: 67849
2009-03-27 16:17:22 +00:00
Rafael Espindola
705f2a6cd2
Avoid hardcoding that X86 addresses have 4 operands.
...
llvm-svn: 67848
2009-03-27 15:57:50 +00:00
Rafael Espindola
227815437a
Use less hard coded constants to make the code less brittle.
...
llvm-svn: 67846
2009-03-27 15:45:05 +00:00
Duncan Sands
75d7e77a58
Reapply r66415, which was reverted in r66426 for
...
causing a bootstrap failure. Bootstraps here on
x86-32-linux and x86-64-linux. Requested by the
author Gabor Greif who says that a bug that might
have been causing the failure has since been fixed.
llvm-svn: 67844
2009-03-27 15:29:38 +00:00
Rafael Espindola
e728019392
I am trying to add a segment to the X86 addresses matching to
...
improve TLS support (see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090309/075220.html ), but that code is VERY brittle.
This patch just makes it a bit more resistant.
llvm-svn: 67843
2009-03-27 15:26:30 +00:00
Duncan Sands
3241b74f69
Revert r67798: it breaks llvm-gcc bootstrap on x86-64-linux, presumably due to
...
a miscompilation.
make[4]: Entering directory `gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include'
if [ ! -d "./x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch" ]; then \
mkdir -p ./x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch; \
fi; \
gcc-4.2.llvm-objects/./gcc/xgcc -shared-libgcc -Bgcc-4.2.llvm-objects/./gcc -nostdinc++
-Lgcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/src -Lgcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/include -isystem /usr/local/gnat-llvm/x86_64-unknown-linux-gnu/sys-include -Winvalid-pch -Wno-deprecated -x
c++-header -g -O2 -D_GNU_SOURCE -Igcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu
-Igcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include -Igcc-4.2.llvm/libstdc++-v3/libsupc++ -O2 -g
gcc-4.2.llvm/libstdc++-v3/include/precompiled/stdtr1c++.h -o x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch/O2g.gch
In file included from gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/repeat.h:247,
from gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/functional:1098,
from gcc-4.2.llvm/libstdc++-v3/include/precompiled/stdtr1c++.h:53:
gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/functional_iterate.h:417: internal compiler error: in ggc_recalculate_in_use_p, at
ggc-page.c:1602
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs/ > for instructions.
make[4]: *** [x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch/O2g.gch] Error 1
llvm-svn: 67839
2009-03-27 14:56:47 +00:00
Mikhail Glushenkov
0f78c2721b
Documentation update.
...
Expand a bit on various '--*-graph' options.
llvm-svn: 67836
2009-03-27 12:58:29 +00:00
Mikhail Glushenkov
f4be420def
-write-graph now can be used with -o.
...
Makes it possible to set the output file name.
llvm-svn: 67835
2009-03-27 12:57:14 +00:00
Duncan Sands
99d0b2353e
Revert previous change in favour of an explanatory
...
comment.
llvm-svn: 67833
2009-03-27 11:35:00 +00:00
Duncan Sands
af7ae6ce3c
A Release-Asserts build makes it sound like assertions
...
are turned on, while in fact they are turned off. Name
this Release-NoAsserts instead.
llvm-svn: 67831
2009-03-27 09:41:56 +00:00
John Mosby
a1be2dcd63
Shrink wrapping in PEI: initial release. Finishing development, enable with --shrink-wrap.
...
llvm-svn: 67828
2009-03-27 06:09:40 +00:00
Evan Cheng
87a801af59
Add a __builtin___memset_chk test.
...
llvm-svn: 67815
2009-03-27 02:45:14 +00:00
Dale Johannesen
4026b041ce
One more place to skip debug info.
...
llvm-svn: 67811
2009-03-27 01:13:37 +00:00
Devang Patel
fe7c0492a0
While hoisting an instruction, update alias info set tracker.
...
llvm-svn: 67798
2009-03-26 23:48:52 +00:00
Mike Stump
a0c86128ed
Update to account for driver renaming.
...
llvm-svn: 67791
2009-03-26 23:43:14 +00:00
Evan Cheng
d88ebc352c
-no-implicit-float means explicit fp operations are legal.
...
llvm-svn: 67784
2009-03-26 23:06:32 +00:00
Evan Cheng
99c16729d3
Add -march=x86.
...
llvm-svn: 67783
2009-03-26 23:03:32 +00:00
Mikhail Glushenkov
87aa96ddf3
Fix misc. small issues with debug visualization.
...
Detailed bug report:
http://llvm.org/bugs/show_bug.cgi?id=3873
llvm-svn: 67768
2009-03-26 21:23:48 +00:00
Evan Cheng
904f14663d
tADDhirr is a thumb instruction. Do not allow this code to be reached in non-thumb mode.
...
llvm-svn: 67765
2009-03-26 19:09:01 +00:00
Owen Anderson
76a561f35e
Don't assign a new stack slot if the pre-alloc splitter already assigned one.
...
llvm-svn: 67764
2009-03-26 18:53:38 +00:00
Jim Grosbach
975c1cb41a
fix a few spelling errors and typos
...
llvm-svn: 67758
2009-03-26 16:17:51 +00:00
Jim Grosbach
4bae1ac5e8
Use 'bool' for FoundRC
...
llvm-svn: 67750
2009-03-26 14:45:34 +00:00
Bill Wendling
55a2cd736d
Add -f to RUN line.
...
llvm-svn: 67744
2009-03-26 06:17:54 +00:00
Bill Wendling
aa28be652c
Pull transform from target-dependent code into target-independent code.
...
llvm-svn: 67742
2009-03-26 06:14:09 +00:00
Chris Lattner
f661d328c4
no need for eh info
...
llvm-svn: 67740
2009-03-26 05:51:18 +00:00
Chris Lattner
78b7cbe668
fix warning in -asserts mode.
...
llvm-svn: 67739
2009-03-26 05:29:34 +00:00
Chris Lattner
f38fd11a26
fix some warnings in release-asserts mode.
...
llvm-svn: 67738
2009-03-26 05:28:26 +00:00
Chris Lattner
3c04970f31
fix an apparently real bug exposed by a warning in -asserts mode.
...
llvm-svn: 67737
2009-03-26 05:28:14 +00:00
Chris Lattner
3871781c7b
fix warning in -asserts build.
...
llvm-svn: 67736
2009-03-26 05:25:59 +00:00
Bill Wendling
996749e912
Add testcase for r67728.
...
llvm-svn: 67729
2009-03-26 01:52:47 +00:00
Bill Wendling
94f299f2c5
Match this pattern so that we can generate simpler code:
...
%a = ...
%b = and i32 %a, 2
%c = srl i32 %b, 1
%d = br i32 %c,
into
%a = ...
%b = and %a, 2
%c = X86ISD::CMP %b, 0
%d = X86ISD::BRCOND %c ...
This applies only when the AND constant value has one bit set and the SRL
constant is equal to the log2 of the AND constant. The back-end is smart enough
to convert the result into a TEST/JMP sequence.
llvm-svn: 67728
2009-03-26 01:47:50 +00:00
Bill Wendling
189d67181c
Doxygen-ify comments.
...
llvm-svn: 67727
2009-03-26 01:46:56 +00:00
Dale Johannesen
db90560c1c
Skip debug info one more place. (This one gets
...
called from llc, not opt, but it's an IR level
optimization nevertheless.)
llvm-svn: 67724
2009-03-26 01:15:07 +00:00
Devang Patel
4555618854
Before deleting a basic block, give other loop passes a chance cleanup analysis values, related to the instructions in the basic block.
...
llvm-svn: 67719
2009-03-25 23:57:48 +00:00
Jim Grosbach
292ea55130
Modify getRegisterValueType() to allow for a register being in mutliple
...
register classes. Before, MVT::Other would be returned anytime a reg was
in multiple register classes. Now, MVT::Other is only returned if the types
for those register classes differ.
llvm-svn: 67714
2009-03-25 23:28:33 +00:00
Evan Cheng
1e550e15cc
Add a test case for PR3779: when to promote the function return value.
...
llvm-svn: 67702
2009-03-25 20:30:19 +00:00
Evan Cheng
2e9f42bed5
Revert 67132. This is breaking some objective-c apps.
...
Also fixes SDISel so it *does not* force promote return value if the function is not marked signext / zeroext.
llvm-svn: 67701
2009-03-25 20:20:11 +00:00
Evan Cheng
1bb604aff5
One more test.
...
llvm-svn: 67694
2009-03-25 17:45:18 +00:00
Dale Johannesen
eb1646d28c
When optimizing with debug info, don't keep the
...
stoppoint nodes around until Legalize; doing this
imposed an ordering on a sequence of loads that
came from different lines, interfering with scheduling.
llvm-svn: 67692
2009-03-25 17:36:08 +00:00
Evan Cheng
4b6c049b3f
Add __builtin___memcpy_chk tests.
...
llvm-svn: 67691
2009-03-25 16:49:31 +00:00
Duncan Sands
39d0946db5
These tests pass on linux.
...
llvm-svn: 67689
2009-03-25 16:43:59 +00:00
Evan Cheng
b86a445d39
Add a __builtin_object_size test.
...
llvm-svn: 67688
2009-03-25 16:29:33 +00:00
Chris Lattner
56a95f6c16
Fix a bug in our autoupgrade support: in an argument list to a function
...
call, we should treat "i64 zext" as the start of a constant expr, but
"i64 0 zext" as an argument with an obsolete attribute on it (this form
is already tested by test/Assembler/2007-07-30-AutoUpgradeZextSext.ll).
Make the autoupgrade logic more discerning to avoid treating "i64 zext"
as an old-style attribute, causing us to reject a valid constant expr.
This fixes PR3876.
llvm-svn: 67682
2009-03-25 06:36:36 +00:00
Gabor Greif
2755edf4c4
do not rely on callee being operand 0
...
llvm-svn: 67681
2009-03-25 06:32:59 +00:00
Devang Patel
68b0881d94
Do not ignore DW_TAG_class_type!
...
llvm-svn: 67675
2009-03-25 03:52:06 +00:00
Evan Cheng
499d5f333f
CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
...
llvm-svn: 67669
2009-03-25 01:48:21 +00:00
Evan Cheng
5e5a63cf8f
CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
...
llvm-svn: 67668
2009-03-25 01:47:28 +00:00
Evan Cheng
9966403e90
Don't print global names twice with -asm-verbose.
...
llvm-svn: 67667
2009-03-25 01:08:42 +00:00
Dan Gohman
7f570d5491
Revert r67655 and r67656, as they are breaking the build. I'm
...
not going to persue this further at this time.
llvm-svn: 67666
2009-03-25 00:52:11 +00:00
Chris Lattner
c3b2111d97
Fix PR3874 by restoring a condition I removed, but making it more
...
precise than it used to be.
llvm-svn: 67662
2009-03-25 00:28:58 +00:00
Devang Patel
a6e85a19c6
Do not ignore DW_TAG_class_type!
...
llvm-svn: 67661
2009-03-25 00:28:40 +00:00
Dan Gohman
1e7602a20e
LLVM's master Makefile.common is in LLVM_SRC_ROOT, not LLVM_OBJ_ROOT.
...
llvm-svn: 67658
2009-03-25 00:09:05 +00:00
Chris Lattner
9e94538005
oops, I intended to remove this, not comment it out. Thanks Duncan!
...
llvm-svn: 67657
2009-03-24 23:48:25 +00:00
Dan Gohman
9d4d283024
Regenerate configure.
...
llvm-svn: 67656
2009-03-24 23:47:11 +00:00
Dan Gohman
34be8be297
Fix paths; AutoRegen.sh changes its current working directory to be the
...
autoconf directory, but these paths need to be relative to the main
source directory.
llvm-svn: 67655
2009-03-24 23:46:25 +00:00
Dan Gohman
afcd6a3133
Update for autoconf 2.6x;
...
llvm-svn: 67654
2009-03-24 23:45:13 +00:00
Misha Brukman
d1d2c50ea7
Converted a1.ll to unittests.
...
llvm-svn: 67652
2009-03-24 21:36:09 +00:00
Duncan Sands
61837e6dc8
Mention explicitly that the Ada front-end will not bootstrap.
...
The configure line had --disable-bootstrap, but it was not
clear that this is essential.
llvm-svn: 67651
2009-03-24 21:16:39 +00:00
Evan Cheng
f413a88839
Fix PR3845: Avoid stale MachineInstruction pointer reference.
...
llvm-svn: 67649
2009-03-24 20:33:17 +00:00
Dan Gohman
24e02b1043
Fix bash-isms.
...
llvm-svn: 67647
2009-03-24 20:21:37 +00:00
Gabor Greif
e7e5becdd2
simplify logic and get rid of the assumption that operand 0 is the callee
...
llvm-svn: 67642
2009-03-24 19:28:39 +00:00
Chris Lattner
306813cbbb
canonicalize inttoptr and ptrtoint instructions which cast pointers
...
to/from integer types that are not intptr_t to convert to intptr_t
then do an integer conversion to the dest type. This exposes the
cast to the optimizer.
llvm-svn: 67638
2009-03-24 18:35:40 +00:00
Dale Johannesen
4d7e4ee799
fix one more fp80 case (used only by Interpreter)
...
and streamline code here a bit.
llvm-svn: 67636
2009-03-24 18:16:17 +00:00
Chris Lattner
d9eb41177a
two changes:
...
1. Make instcombine always canonicalize trunc x to i1 into an icmp(x&1). This
exposes the AND to other instcombine xforms and is more of what the code
generator expects.
2. Rewrite the remaining trunc pattern match to use 'match', which
simplifies it a lot.
llvm-svn: 67635
2009-03-24 18:15:30 +00:00
Dale Johannesen
f259f3f312
Change JIT for different layout of fp80.
...
llvm-svn: 67629
2009-03-24 17:35:45 +00:00
Dan Gohman
9fc30d5c30
Add a testcase for the scheduling heuristic introduced in r67586.
...
llvm-svn: 67622
2009-03-24 16:38:27 +00:00
Chris Lattner
c35847e109
more tidying: name the components of PhysReg in the case when
...
the target constraint specifies a specific physreg.
llvm-svn: 67618
2009-03-24 15:27:37 +00:00
Chris Lattner
42eceb3491
Tidy a bit more.
...
llvm-svn: 67617
2009-03-24 15:25:07 +00:00
Chris Lattner
246eda43bd
simplify this code a bit now that "allocation to a vreg class" can never
...
fail.
llvm-svn: 67616
2009-03-24 15:22:11 +00:00
Dan Gohman
efd2d44aa5
I was convinced that it's ok to allow a second i8 return value
...
to be returned in DL. LLVM's multiple-return-value support is
not ABI-conforming; front-ends that wish to have code emitted
that conforms to an ABI are currently expected to make
arrangements for this on their own rather than assuming that
multiple-return-values will automatically do the right thing.
This commit doesn't fundamentally change this situation.
llvm-svn: 67588
2009-03-24 01:04:34 +00:00
Dan Gohman
f3746cbc56
Minor compile-time optimization; don't bother checking
...
canClobberPhysRegDefs if the successor node doesn't
clobber any physical registers.
llvm-svn: 67587
2009-03-24 00:50:07 +00:00
Dan Gohman
9a658d72db
Add a pre-pass to the burr-list scheduler which makes adjustments to
...
help out the register pressure reduction heuristics in the case of
nodes with multiple uses. Currently this uses very conservative
heuristics, so it doesn't have a broad impact, but in cases where it
does help it can make a big difference.
llvm-svn: 67586
2009-03-24 00:49:12 +00:00
Evan Cheng
a774a99245
Do not emit comments unless -asm-verbose.
...
llvm-svn: 67580
2009-03-24 00:17:40 +00:00
Dale Johannesen
32dfb35281
Use a SmallPtrSet instead of std::set.
...
llvm-svn: 67578
2009-03-23 23:39:20 +00:00
Evan Cheng
7fe1b0f50f
Fix a bug in spill weight computation. If the alias is a super-register, and the super-register is in the register class we are trying to allocate. Then add the weight to all sub-registers of the super-register even if they are not aliases.
...
e.g. allocating for GR32, bh is not used, updating bl spill weight.
bl should get the same spill weight otherwise it will be choosen
as a spill candidate since spilling bh doesn't make ebx available.
This fix PR2866.
llvm-svn: 67574
2009-03-23 22:57:19 +00:00
Ted Kremenek
c8e54db801
Add sanity check in Clang TableGen backend to check if 'Component' is a string.
...
llvm-svn: 67565
2009-03-23 21:54:33 +00:00
Dale Johannesen
93eefa0043
Fix internal representation of fp80 to be the
...
same as a normal i80 {low64, high16} rather
than its own {high64, low16}. A depressing number
of places know about this; I think I got them all.
Bitcode readers and writers convert back to the old
form to avoid breaking compatibility.
llvm-svn: 67562
2009-03-23 21:16:53 +00:00
John Mosby
2441a7df96
README.txt: test commit w/blank line appended
...
llvm-svn: 67560
2009-03-23 21:00:45 +00:00
Dan Gohman
ed0e8d44ce
When unfolding a load during scheduling, the new operator node has
...
a data dependency on the load node, so it really needs a
data-dependence edge to the load node, even if the load previously
existed.
And add a few comments.
llvm-svn: 67554
2009-03-23 20:20:43 +00:00
Evan Cheng
4dc0c6697f
Update test for pr3864.
...
llvm-svn: 67545
2009-03-23 18:27:36 +00:00
Evan Cheng
f858466018
Fix PR3391 and PR3864. Reg allocator infinite looping.
...
llvm-svn: 67544
2009-03-23 18:24:37 +00:00
Dan Gohman
f477262e69
Don't set SUnit::hasPhysRegDefs to true unless the defs are
...
actually have uses, which reflects the way it's used.
llvm-svn: 67540
2009-03-23 17:39:36 +00:00
Dan Gohman
a366da1bf7
Fix canClobberPhysRegDefs to check all SDNodes grouped together
...
in an SUnit, instead of just the first one. This fix is needed
by some upcoming scheduler changes.
llvm-svn: 67531
2009-03-23 16:23:01 +00:00
Dan Gohman
52c278e54d
Add a new bit to SUnit to record whether a node has implicit physreg
...
defs, regardless of whether they are actually used.
llvm-svn: 67528
2009-03-23 16:10:52 +00:00
Dan Gohman
4f2fea1a21
Now that errs() is properly non-buffered, there's no need to
...
explicitly flush it.
llvm-svn: 67526
2009-03-23 15:57:19 +00:00
Dan Gohman
7135a9d166
Clarify a comment.
...
llvm-svn: 67525
2009-03-23 15:54:02 +00:00
Dan Gohman
21ff35195e
LoopVR is not CFGOnly.
...
llvm-svn: 67524
2009-03-23 15:50:52 +00:00
Dan Gohman
5aabc424b1
Enhance LiveValues to work on PHI operands.
...
llvm-svn: 67523
2009-03-23 15:49:37 +00:00
Dan Gohman
87cd443ae9
Make getOperandNumForIncomingValue and getOperandNumForIncomingBlock
...
static member functions, and add getIncomingValueNumForOperand
and getIncomingBlockNumForOperand, which are the respective
inverses.
llvm-svn: 67522
2009-03-23 15:48:29 +00:00
Dan Gohman
4a683478d5
Correct some comments. Operand numbers start at 0.
...
llvm-svn: 67518
2009-03-23 15:40:10 +00:00
Evan Cheng
968c3b0d6e
Model inline asm constraint which ties an input to an output register as machine operand TIED_TO constraint. This eliminated the need to pre-allocate registers for these. This also allows register allocator can eliminate the unneeded copies.
...
llvm-svn: 67512
2009-03-23 08:01:15 +00:00
Evan Cheng
47c9750f04
Do not fold away subreg_to_reg if the source register has a sub-register index. That means the source register is taking a sub-register of a larger register. e.g. On x86
...
%RAX<def> = ...
%RAX<def> = SUBREG_TO_REG 0, %EAX:3<kill>, 3
The first def is defining RAX, not EAX so the top bits were not zero-extended.
llvm-svn: 67511
2009-03-23 07:19:58 +00:00
Chris Lattner
f2b60658ef
fix a bug Alexei Svitkine pointed out.
...
llvm-svn: 67510
2009-03-23 06:46:20 +00:00
Chris Lattner
fb95472123
When we restore signal handlers, restore them back to what they
...
were when we came around, not to their default handler. This
should fix PR3848
llvm-svn: 67509
2009-03-23 05:55:36 +00:00
Chris Lattner
f299a68ee0
factorize signal registration, part of PR3848.
...
llvm-svn: 67508
2009-03-23 05:42:29 +00:00
Dan Gohman
772de0ae2d
Fix a grammaro in a comment that Bill noticed.
...
llvm-svn: 67507
2009-03-23 05:02:44 +00:00
Chris Lattner
57be315d36
tt'ify.
...
llvm-svn: 67505
2009-03-23 04:53:34 +00:00
Chris Lattner
30bc972596
VC++ 6.0 is not future work :)
...
Do not recommend llvm::OStream anymore. Use raw_ostream or MemoryBuffer.
llvm-svn: 67504
2009-03-23 04:52:53 +00:00
Dan Gohman
70d9929def
Add comments explaining why there's only one register for
...
i8 return values.
llvm-svn: 67502
2009-03-23 04:28:24 +00:00
Evan Cheng
3138f7a781
Missed this as part of r67451.
...
llvm-svn: 67500
2009-03-23 03:45:56 +00:00
Chris Lattner
b6ff0f3a4d
Fix PR3860 by correcting a predicate.
...
llvm-svn: 67473
2009-03-22 19:22:53 +00:00
Duncan Sands
b1656c1e1f
Add some explanations of how apint loads and stores
...
work.
llvm-svn: 67471
2009-03-22 11:33:16 +00:00
Bill Wendling
a443ab4bcd
Really should pass -dylib to the linker...
...
llvm-svn: 67469
2009-03-22 08:56:15 +00:00
Bill Wendling
f3ef2c758f
A dylib should be built as a dylib and not a bundle.
...
llvm-svn: 67468
2009-03-22 08:28:45 +00:00
Chris Lattner
adda37fb62
add method to access a template argument.
...
llvm-svn: 67458
2009-03-22 00:18:18 +00:00
Duncan Sands
1f15ca7c7a
Factorize out a concept - no functionality change.
...
llvm-svn: 67454
2009-03-21 21:27:31 +00:00
Evan Cheng
15f1754eb4
Re-commit r67334 and r67349 with fix.
...
llvm-svn: 67451
2009-03-21 18:12:24 +00:00
Chris Lattner
cbeda87da1
add a fastpath to ConstantExpr::getBitCast to handle the case when an obviously
...
unneeded bitcast is requested. This is common for frontends who just unconditionally
cast even if the target is often the right type already. THis prevents going into
getFoldedCast which switches on the opcode and does a bunch of other stuff before
doing the same opzn.
llvm-svn: 67435
2009-03-21 06:55:54 +00:00
Chris Lattner
9b62dff5f6
add some inline methods for infix operators on sparse vectors,
...
tidy some df iteration stuff, patch by John Mosby!
llvm-svn: 67428
2009-03-21 05:40:09 +00:00
Bruno Cardoso Lopes
9b9586a5ae
Removed AFGR32 register class
...
Handle odd registers allocation in FGR32.
llvm-svn: 67422
2009-03-21 00:05:07 +00:00
Bob Wilson
dc40d5ae2c
Fix a few more indentation problems and an 80-column violation.
...
llvm-svn: 67416
2009-03-20 23:16:43 +00:00
Bob Wilson
7117a916f5
No functional changes. Fix indentation and whitespace only.
...
llvm-svn: 67412
2009-03-20 22:42:55 +00:00
Chris Lattner
0a981d1d36
Fix instcombine to not introduce undefined shifts when merging two
...
shifts together. This fixes PR3851.
llvm-svn: 67411
2009-03-20 22:41:15 +00:00
Duncan Sands
a09e0afe74
Don't load values out of global constants with weak
...
linkage: the value may be replaced with something
different at link time. (Frontends that want to
allow values to be loaded out of weak constants can
give their constants weak_odr linkage).
llvm-svn: 67407
2009-03-20 21:53:29 +00:00
Dan Gohman
3bdc4bdba6
Simplify this code; use a while instead of an if and a do-while.
...
llvm-svn: 67400
2009-03-20 20:42:23 +00:00
Evan Cheng
2e55923fba
For inline asm output operand that matches an input. Encode the input operand index in the high bits.
...
llvm-svn: 67387
2009-03-20 18:03:34 +00:00
Sanjiv Gupta
4655d731e1
Fixed comment for libcalls.
...
llvm-svn: 67373
2009-03-20 14:10:20 +00:00
Sanjiv Gupta
83debdf4b4
Fixed build warnings for unused variables.
...
llvm-svn: 67372
2009-03-20 13:49:20 +00:00
Sanjiv Gupta
c035b7e879
Reformatting. Inserted code comments. Cleaned interfaces.
...
Removed unncessary code. No functionality change.
llvm-svn: 67371
2009-03-20 13:42:20 +00:00
Sanjiv Gupta
e9759c458c
Fixed the comment. No functionality change.
...
llvm-svn: 67370
2009-03-20 09:38:50 +00:00
Nick Lewycky
18ca80cdda
Revert r67334 and r37349 which break "make check" on Linux.
...
llvm-svn: 67368
2009-03-20 07:56:31 +00:00
Chris Lattner
f0db9b6321
Apply the patch requested in PR3846.
...
llvm-svn: 67364
2009-03-20 05:08:24 +00:00
Mon P Wang
f67448adf8
Added option to enable generating less precise mad (multiply addition)
...
for those architectures that support the instruction.
llvm-svn: 67363
2009-03-20 05:06:58 +00:00
Dan Gohman
76402b9a3d
The last use in a block that doesn't have successors
...
(return or unreachable) is a kill.
llvm-svn: 67357
2009-03-20 01:28:21 +00:00
Evan Cheng
6d6647c7b3
Fix typo's.
...
llvm-svn: 67349
2009-03-20 00:14:09 +00:00
Sebastian Redl
8d5baa09f8
Fix the Win32 VS2008 build:
...
- Make type declarations match the struct/class keyword of the definition.
- Move AddSignalHandler into the namespace where it belongs.
- Correctly call functions from template base.
- Some other small changes.
With this patch, LLVM and Clang should build properly and with far less noise under VS2008.
llvm-svn: 67347
2009-03-19 23:26:52 +00:00
Evan Cheng
1361cbbb0b
Added MachineInstr::isRegTiedToDefOperand to check for two-addressness.
...
llvm-svn: 67335
2009-03-19 20:30:06 +00:00
Evan Cheng
05799db963
More makefile changes to allow dejagnu tests to pass when system tools default to a different target from the llvm configuration (e.g. 64-bit gcc and 32-bit llvm).
...
llvm-svn: 67334
2009-03-19 20:27:23 +00:00
Misha Brukman
5182b758a0
Renamed unittest files to have a consistent {Tt}est suffix.
...
llvm-svn: 67326
2009-03-19 19:09:48 +00:00
Dan Gohman
1026a8001f
SADDO and UADDO are commutative.
...
llvm-svn: 67319
2009-03-19 18:53:45 +00:00
Dale Johannesen
2050968df9
Clear the cached cost when removing a function in
...
the inliner; prevents nondeterministic behavior
when the same address is reallocated.
Don't build call graph nodes for debug intrinsic calls;
they're useless, and there were typically a lot of them.
llvm-svn: 67311
2009-03-19 18:03:56 +00:00
Dan Gohman
37061eef5d
Add a liveness analysis pass for LLVM IR values. This computes
...
the set of blocks in which values are used, the set in which
values are live-through, and the set in which values are
killed. For the live-through and killed sets, conservative
approximations are used.
llvm-svn: 67309
2009-03-19 17:29:04 +00:00
Dale Johannesen
e4f361212b
Fix comment typo.
...
llvm-svn: 67307
2009-03-19 17:23:29 +00:00
Dale Johannesen
52bc2aac8a
This pass keeps a map of Instructions to Rank numbers,
...
and was deleting Instructions without clearing the
corresponding map entry. This led to nondeterministic
behavior if the same address got allocated to another
Instruction within a short time.
llvm-svn: 67306
2009-03-19 17:22:53 +00:00
Ted Kremenek
dd03b5bb63
Fix regression in 'tblgen -gen-clang-diags-defs': Emit the diagnostic kind instead of "DIAGNOSTICCONTROLLED".
...
llvm-svn: 67305
2009-03-19 17:18:09 +00:00
Chris Lattner
58bd3dccf9
Fix PEI to not walk off the start of a block when an updated instruction
...
is the first in its block. This is PR3842.
llvm-svn: 67304
2009-03-19 17:15:43 +00:00
Duncan Sands
8208465036
Fix comment typo.
...
llvm-svn: 67302
2009-03-19 11:37:15 +00:00
Nick Lewycky
063699af70
Fix a couple glaring whitespace issues. This file isn't internally consistent
...
either.
llvm-svn: 67288
2009-03-19 06:31:22 +00:00
Nick Lewycky
bfd4ad67c7
Remove strange extra semicolons.
...
llvm-svn: 67287
2009-03-19 05:51:39 +00:00
Nate Begeman
dbe3f77f5b
Add support to tablegen for naming the nodes themselves, not just the operands,
...
in selectiondag patterns. This is required for the upcoming shuffle_vector rewrite,
and as it turns out, cleans up a hack in the Alpha instruction info.
llvm-svn: 67286
2009-03-19 05:21:56 +00:00
Bruno Cardoso Lopes
3b7b301a24
Added support for Mips O32 Calling Convention
...
llvm-svn: 67280
2009-03-19 02:12:28 +00:00
Ted Kremenek
4724b8262f
tblgen -gen-clang-diags-options: Output OptionTable entries in lexicographic
...
order.
llvm-svn: 67244
2009-03-18 21:36:46 +00:00
Ted Kremenek
bf76c6d971
'tblgen -gen-clang-diags-options' now outputs the OptionTable:
...
static const WarningOption OptionTable[] = {
{"unused-macros", DIAGS(UnusedMacrosDiags)}
...
};
This table is not yet properly sorted.
llvm-svn: 67242
2009-03-18 21:28:47 +00:00
Ted Kremenek
4a330b7ec1
Add another Clang TableGen-backend (-gen-clang-diags-options) for emitting
...
declarations for controlling groups of warnings. Currently this transforms:
def UnusedMacrosDiags : Option<"unused-macros", [pp_macro_not_used]>;
into:
static const diag::kind UnusedMacrosDiags[] = { diag::pp_macro_not_used };
llvm-svn: 67239
2009-03-18 21:16:16 +00:00
Chris Lattner
0f6dc78cfe
include the null at the end of a memorybuffer as part of the buffer.
...
This allows tblgen to handle include "foo.td" when the quote is exactly
the last character in a file. rdar://6695728
llvm-svn: 67232
2009-03-18 20:36:45 +00:00
Bill Wendling
7b06cbe6d4
These tests are now passing on Darwin because of r67139.
...
llvm-svn: 67215
2009-03-18 17:45:11 +00:00
Chris Lattner
514fc5b143
aha, DAE does have to think about PHI nodes. Many thanks to "Dr Evil" (aka Duncan)
...
for pointing this out :)
llvm-svn: 67212
2009-03-18 16:48:45 +00:00
Chris Lattner
595923ff75
Fix PR3826 - InstComb assert with vector shift, by not calling ComputeNumSignBits on a vector.
...
llvm-svn: 67211
2009-03-18 16:32:19 +00:00
Chris Lattner
ab8022055a
add an assertion to make it clear that PHI nodes are not allowed.
...
llvm-svn: 67210
2009-03-18 16:23:56 +00:00
Zhou Sheng
4e2af3cb55
Explicitly check for StoreInst, do not lose the chance to delete
...
unused loads or bitcasts.
llvm-svn: 67202
2009-03-18 12:48:48 +00:00
Zhou Sheng
05bea906c1
Revert my previous change on Local.cpp, instead, fix the bug on scalarrepl.
...
If the instruction has no users, it is also not only used by debug info
and should not be deleted.
llvm-svn: 67194
2009-03-18 10:13:08 +00:00
Rafael Espindola
d2b64fc65b
Add -relocation-model=pic so that the test works
...
both in Linux and Darwin.
llvm-svn: 67191
2009-03-18 09:38:28 +00:00
Zhou Sheng
64a6a092b1
Fix a bug.
...
If I->use_empty(), this method should return false.
llvm-svn: 67180
2009-03-18 07:56:13 +00:00
Mon P Wang
32c8074be6
Added missing support for widening when splitting an unary op (PR3683)
...
and expanding a bit convert (PR3711). In both cases, we extract the
valid part of the widen vector and then do the conversion.
llvm-svn: 67175
2009-03-18 06:24:04 +00:00
Evan Cheng
8df898917f
Add another test case for r64440.
...
llvm-svn: 67156
2009-03-18 02:43:01 +00:00
Evan Cheng
110377c669
xfail these tests for now.
...
llvm-svn: 67143
2009-03-18 00:44:45 +00:00
Chris Lattner
a6bed3e950
Disable the "call to immediate" optimization on x86-64. It is
...
not safe in general because the immediate could be an arbitrary
value that does not fit in a 32-bit pcrel displacement.
Conservatively fall back to loading the value into a register
and calling through it.
We still do the optzn on X86-32.
llvm-svn: 67142
2009-03-18 00:43:52 +00:00
Chris Lattner
a15ce21135
Fix PR3807 by inserting 'insertelement' instructions in the normal dest of
...
an invoke instead of after the invoke (in its block), which is invalid.
llvm-svn: 67139
2009-03-18 00:31:45 +00:00
Bill Wendling
4eaeb4ef22
A more proper -mtriple.
...
llvm-svn: 67138
2009-03-18 00:19:44 +00:00
Bill Wendling
3aad86fa3f
Temporary fix. I think Rafael wanted this to be Linux-only.
...
llvm-svn: 67137
2009-03-18 00:16:36 +00:00
Chris Lattner
42e9ca42ce
LSR shouldn't ever try to hack on integer IV's larger than 64-bits. Right now
...
it is not APInt clean, but even when it is it needs to be evaluated carefully
to determine whether it is actually profitable.
This fixes a crash on PR3806
llvm-svn: 67134
2009-03-17 23:58:30 +00:00
Rafael Espindola
4606b12108
Don't force promotion of return arguments on the callee.
...
Some architectures (like x86) don't require it.
This fixes bug 3779.
llvm-svn: 67132
2009-03-17 23:43:59 +00:00
Daniel Dunbar
437b8a5ccc
Add BUILTIN_EXPECT Support/Compiler macro.
...
- Use for exceptional buffer conditions in raw_ostream:write to shave
off a cycle or two.
- Please rename if you have a better one.
llvm-svn: 67103
2009-03-17 21:15:18 +00:00
Chris Lattner
4359f3f26f
this is apparently passing now. Evan/Dan, please check
...
to see if this is producing the expected code or not, I'm
not sure what the test was intended to check.
llvm-svn: 67099
2009-03-17 20:23:43 +00:00
Devang Patel
62c72c6826
test case for rev. 67095.
...
llvm-svn: 67096
2009-03-17 19:47:21 +00:00
Chris Lattner
2363d0b8b9
Fix codegen to compute the size of an allocation by multiplying the
...
size by the array amount as an i32 value instead of promoting from
i32 to i64 then doing the multiply. Not doing this broke wrap-around
assumptions that the optimizers (validly) made. The ultimate real
fix for this is to introduce i64 version of alloca and remove mallocinst.
This fixes PR3829
llvm-svn: 67093
2009-03-17 19:36:00 +00:00
Chris Lattner
e549493a55
Remove a condition which is always true.
...
llvm-svn: 67089
2009-03-17 17:55:15 +00:00