Duncan Sands
70424d195a
Silence the compiler warning differently. The
...
original method caused gcc-4.2 to complain.
llvm-svn: 51186
2008-05-16 09:19:16 +00:00
Evan Cheng
c5c7a290e9
Re-enable tail duplication pass (now with default threshold down to 1 instruction).
...
llvm-svn: 51184
2008-05-16 07:57:10 +00:00
Evan Cheng
173a53f87c
Do not dup malloc, vector instructions, etc. Throttle the default theshold way down.
...
llvm-svn: 51183
2008-05-16 07:55:50 +00:00
Owen Anderson
c7d6eceb69
Remove ADCE's ability to delete loops. This ability is now implemented in a
...
safer manner by loop deletion.
llvm-svn: 51182
2008-05-16 04:34:51 +00:00
Owen Anderson
bdcf408d67
Move this test from ADCE to loop deletion, where it is more appropriate.
...
llvm-svn: 51181
2008-05-16 04:34:19 +00:00
Owen Anderson
ecc12fe81d
Use loop deletion instead of ADCE in these tests.
...
llvm-svn: 51180
2008-05-16 04:33:37 +00:00
Owen Anderson
ad5f211b48
Clean ups for loop deletion based on Chris' feedback.
...
Also, use SCEV to determine the trip count of the loop, which is more powerful
and accurate that Loop::getTripCount.
llvm-svn: 51179
2008-05-16 04:32:45 +00:00
Owen Anderson
00c7d82391
Use loop deletion instead of ADCE for removing loops.
...
llvm-svn: 51178
2008-05-16 04:27:38 +00:00
Owen Anderson
a74d72d01f
Fix this test. It was testing broken behavior in that it required ADCE to eliminate
...
a potentially infinite loop, which is undesirable. Instead, test the LICM behavior
that we're really interested in.
llvm-svn: 51177
2008-05-16 04:25:09 +00:00
Chris Lattner
5c953b7d27
implement PR2328.
...
llvm-svn: 51176
2008-05-16 02:59:42 +00:00
Dale Johannesen
0bf92b14f1
Use common where we mean common, not weak.
...
llvm-svn: 51173
2008-05-16 00:52:30 +00:00
Dale Johannesen
876dd3ca9e
Treat common as distinct from weak global on Darwin x86.
...
llvm-svn: 51172
2008-05-16 00:52:06 +00:00
Dan Gohman
2f156ae850
Revert the change from r51157 in
...
test/Verifier/2002-11-05-GetelementptrPointers.ll, which was incorrect.
Instead, fix getIndexedType to not follow pointer types, as
PointerType is a subclass of CompositeType.
llvm-svn: 51171
2008-05-16 00:16:32 +00:00
Dan Gohman
32db11b634
Update comments based on Duncan's feedback.
...
llvm-svn: 51170
2008-05-15 23:35:32 +00:00
Dan Gohman
0a0fa7cf78
Fix a bug in LoopStrengthReduce that caused it to emit IR with
...
use-before-def. The problem comes up in code with multiple PHIs where
one PHI is being rewritten in terms of the other, but the other needs
to be casted first. LLVM rules requre the cast instruction to be
inserted after any PHI instructions, but when instructions were
inserted to replace the second PHI value with a function of the first,
they were ended up going before the cast instruction. Avoid this
problem by remembering the location of the cast instruction, when one
is needed, and inserting the expansion of the new value after it.
This fixes a bug that surfaced in 255.vortex on x86-64 when
instcombine was removed from the middle of the loop optimization
passes.
llvm-svn: 51169
2008-05-15 23:26:57 +00:00
Dale Johannesen
2918b0ec2f
Remove the S92 code, which really has nothing to do
...
with what the test is testing; makes it pass again on ppc32.
llvm-svn: 51167
2008-05-15 22:23:54 +00:00
Dale Johannesen
5c7dd286a4
Evan has implemented this on ppc, so run the test there.
...
llvm-svn: 51166
2008-05-15 22:22:37 +00:00
Evan Cheng
29e59ad6c9
Fix typos and comments.
...
llvm-svn: 51165
2008-05-15 22:13:02 +00:00
Dale Johannesen
6ef726a066
Allow an extra bit for CommonLinkage.
...
This changes the .bc file format, but if I understand
how it works correctly, old .bc files continue to
be readable.
llvm-svn: 51161
2008-05-15 20:49:28 +00:00
Nate Begeman
f79f52282c
Actually scalarize the operand to BIT_CONVERT instead of asking someone to do
...
something with a v1 type.
llvm-svn: 51160
2008-05-15 20:40:58 +00:00
Steve Naroff
30deeca433
Reverting r51100...I need to use VC++ 2005.
...
llvm-svn: 51159
2008-05-15 20:09:48 +00:00
Dan Gohman
12fce7751b
IR support for extractvalue and insertvalue instructions. Also, begin
...
moving toward making structs and arrays first-class types.
llvm-svn: 51157
2008-05-15 19:50:34 +00:00
Dan Gohman
f52c8044ea
Use static and anonymous namespaces consistently with other passes.
...
llvm-svn: 51156
2008-05-15 19:43:55 +00:00
Devang Patel
a403c15d40
Revert 51067 check-in for now.
...
llvm-svn: 51155
2008-05-15 18:46:28 +00:00
Devang Patel
61724355af
Remove useless check.
...
Patch by Matthijs Kooijman.
llvm-svn: 51154
2008-05-15 18:04:29 +00:00
Evan Cheng
d37a6cf669
Disable JIT symbol table for now.
...
llvm-svn: 51152
2008-05-15 17:31:35 +00:00
Duncan Sands
783cb2d76d
Use of UINT_MAX requires climits, at least when
...
compiling with gcc 4.3.
llvm-svn: 51145
2008-05-15 11:22:50 +00:00
Gabor Greif
697e94cc22
Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
...
llvm-svn: 51143
2008-05-15 10:04:30 +00:00
Evan Cheng
ef377adca0
Make use of vector load and store operations to implement memcpy, memmove, and memset. Currently only X86 target is taking advantage of these.
...
llvm-svn: 51140
2008-05-15 08:39:06 +00:00
Evan Cheng
13e693f331
Remove tail duplication pass.
...
llvm-svn: 51139
2008-05-15 07:43:15 +00:00
Nate Begeman
60f9320fc5
Move the operator new and operator delete out of line. This fixes an issue with
...
operator new() referring to the static initTags function, which has to be in the
same linkage unit as any file including User.h.
llvm-svn: 51136
2008-05-15 01:23:11 +00:00
Dale Johannesen
fa48372a24
Don't assume underlying APInt type is limited
...
to 64 bits.
llvm-svn: 51135
2008-05-14 22:53:25 +00:00
Bill Wendling
3716952f10
Situations can arise when you have a function called that returns a 'void', but
...
is bitcast to return a floating point value. The result of the instruction may
not be used by the program afterwards, and LLVM will happily remove all
instructions except the call. But, on some platforms, if a value is returned as
a floating point, it may need to be removed from the stack (like x87). Thus, we
can't get rid of the bitcast even if there isn't a use of the value.
llvm-svn: 51134
2008-05-14 22:45:20 +00:00
Dale Johannesen
8d76cdb144
Remove undefined behavior in hex string->APFloat
...
conversion. Try 0x1.0000a4p+0f. Neil, please review.
llvm-svn: 51132
2008-05-14 22:05:31 +00:00
Evan Cheng
4ea9d49590
Use a better idiom to silence compiler warnings.
...
llvm-svn: 51131
2008-05-14 21:08:07 +00:00
Chris Lattner
e15051d64b
rename SimplifyCFG.cpp -> SimplifyCFGPass.cpp
...
llvm-svn: 51130
2008-05-14 20:38:44 +00:00
Evan Cheng
ad2b7a7b97
Silence warnings.
...
llvm-svn: 51129
2008-05-14 20:33:21 +00:00
Nate Begeman
7402017b9a
Add support to IR builder for new vicmp, vfcmp routines
...
llvm-svn: 51127
2008-05-14 20:29:46 +00:00
Evan Cheng
0f7fb95e79
Really silence compiler warnings.
...
llvm-svn: 51126
2008-05-14 20:29:30 +00:00
Nate Begeman
94849f2246
Don't generate unused variables in a no-assert build
...
Add some checks to the new vicmp,vfcmp instructions
llvm-svn: 51125
2008-05-14 20:28:31 +00:00
Evan Cheng
a5b0a8d7fe
Really silence compiler warnings.
...
llvm-svn: 51123
2008-05-14 20:26:35 +00:00
Dale Johannesen
21160df793
CommonLinkage (missed a file)
...
llvm-svn: 51120
2008-05-14 20:14:09 +00:00
Dale Johannesen
5c1b6db9ed
Generated files for CommonLinkage.
...
llvm-svn: 51119
2008-05-14 20:13:36 +00:00
Dale Johannesen
ce4396bc92
Add CommonLinkage; currently tentative definitions
...
are represented as "weak", but there are subtle differences
in some cases on Darwin, so we need both. The intent
is that "common" will behave identically to "weak" unless
somebody changes their target to do something else.
No functional change as yet.
llvm-svn: 51118
2008-05-14 20:12:51 +00:00
Evan Cheng
763ec13862
Silence some compiler warnings.
...
llvm-svn: 51115
2008-05-14 20:07:51 +00:00
Devang Patel
f2763e233e
Simplify internalize pass. Add test case.
...
Patch by Matthijs Kooijman!
llvm-svn: 51114
2008-05-14 20:01:01 +00:00
Dan Gohman
3ab94df276
When bit-twiddling CondCode values for integer comparisons produces
...
SETOEQ, is it does with (SETEQ & SETULE), map it to SETEQ.
llvm-svn: 51112
2008-05-14 18:17:09 +00:00
Devang Patel
38e59eb0c7
Recover nestedloop regression reported by nightly tester.
...
llvm-svn: 51110
2008-05-14 18:04:30 +00:00
Tanya Lattner
f85405fced
Check if llvm-gcc is available before running tests. Patch by Matthijs Kooijman!
...
llvm-svn: 51108
2008-05-14 16:32:44 +00:00
Sanjiv Gupta
7fc6027873
Detabification. Fixed indentation and spacing.
...
Changed cout to DOUT, and TODOs to FIXMEs.
Other changes as per coding conventions.
llvm-svn: 51105
2008-05-14 11:31:39 +00:00
Roman Levenstein
52a005ac13
Do not generate by TableGen the hard-coded standard, target-independent part of
...
DAG instruction selectors. Introudce a dedicated header file for this part:
include/llvm/CodeGen/DAGISelHeader.h
TableGen now only generates the include preprocessor directive to include this
new header.
This is a preparation for supporting multiple implementations of instruction
selectors in the future.
Reviewed and approved by Evan and Dan.
llvm-svn: 51102
2008-05-14 10:17:11 +00:00
Argyrios Kyrtzidis
b527271a2c
Upgrading clang VC++ solution to VC++ express 2008.
...
llvm-svn: 51100
2008-05-14 09:58:45 +00:00
Duncan Sands
a0ae8cebec
Make this test pass on x86-32 linux.
...
llvm-svn: 51099
2008-05-14 09:46:01 +00:00
Argyrios Kyrtzidis
c279c59d7b
Adding missing files to Transforms and VMCore VC++ projects.
...
llvm-svn: 51098
2008-05-14 09:39:32 +00:00
Arnold Schwaighofer
2c6b88816d
Add documentation for tail call optimization to CodeGenerator.html. Add a link
...
referring to it to LangRef.html.
llvm-svn: 51097
2008-05-14 09:17:12 +00:00
Sanjiv Gupta
83a510ca59
Added configure switches for PIC16 in configure.ac.
...
Regenerated configure.
llvm-svn: 51096
2008-05-14 08:03:23 +00:00
Nicolas Geoffray
fbdca96469
Fix typo in ParameterAttribute fields usage. Add an include
...
to make the Cpp backend output compilable.
llvm-svn: 51095
2008-05-14 07:52:03 +00:00
Sanjiv Gupta
1f8c9ef4cc
Fixed the file description header at the top to remove the developer name.
...
llvm-svn: 51094
2008-05-14 06:50:01 +00:00
Dan Gohman
f41600da59
Commit the header I accidentally left out of 51083.
...
llvm-svn: 51093
2008-05-14 04:39:40 +00:00
Evan Cheng
6f34ed0d36
Doh. Alignment is in bytes, not in bits.
...
llvm-svn: 51092
2008-05-14 02:49:43 +00:00
Dan Gohman
eabd647cd5
Change target-specific classes to use more precise static types.
...
This eliminates the need for several awkward casts, including
the last dynamic_cast under lib/Target.
llvm-svn: 51091
2008-05-14 01:58:56 +00:00
Dan Gohman
0f45b6fda5
Move RemoveFromVector out of the global namespace.
...
llvm-svn: 51090
2008-05-14 01:02:49 +00:00
Dan Gohman
fd3e3003f3
Whitespace cleanups.
...
llvm-svn: 51089
2008-05-14 00:43:10 +00:00
Dan Gohman
4e974ab933
Make PreVerifyID, IntSigsEnd, and KillSigsEnd const.
...
llvm-svn: 51088
2008-05-14 00:42:30 +00:00
Dan Gohman
c92abb44db
Make getNumContainedManagers and getNumContainedPasses const.
...
llvm-svn: 51087
2008-05-14 00:40:34 +00:00
Dan Gohman
1453fd6de6
Make PassInfo noncopyable.
...
llvm-svn: 51085
2008-05-14 00:39:39 +00:00
Devang Patel
a37cf46c87
Do not run instruction combiner in middle of loop optimization passes.
...
llvm-svn: 51084
2008-05-14 00:26:11 +00:00
Dan Gohman
3dc2d92ebd
Split the loop unroll mechanism logic out into a utility function.
...
Patch by Matthijs Kooijman!
llvm-svn: 51083
2008-05-14 00:24:14 +00:00
Owen Anderson
17816b321f
Fix Analysis/BasicAA/pure-const-dce.ll. This turned out to be a correctness
...
bug as well as a missed optimization. We weren't properly checking for local
dependencies before moving on to non-local ones when doing non-local read-only
call CSE.
llvm-svn: 51082
2008-05-13 23:18:30 +00:00
Gabor Greif
5ef7404dc7
Merge of r51073-51074 from use-diet branch.
...
Do not rely on std::swap<Use>, provide a (faster) member function instead.
This change is primarily necessitated by MSVC++'s incompatibility with
declaring std::swap<Use> to be a friend of Use.
Also contains some minor tweaks to Use inline functions,
to undo pointless changes that sneaked in with the last merge.
llvm-svn: 51078
2008-05-13 22:51:52 +00:00
Eric Christopher
29fafcccd3
Make this function public.
...
llvm-svn: 51077
2008-05-13 22:51:04 +00:00
Devang Patel
a9fcf009a3
Dominance Frontier is cfg only pass.
...
llvm-svn: 51075
2008-05-13 22:43:21 +00:00
Owen Anderson
3ab976a21f
Fix memdep's handling of invokes when finding the dependency of another call
...
instruction. This fixes some Ada miscompiles reported in PR2324.
llvm-svn: 51069
2008-05-13 21:25:37 +00:00
Chris Lattner
bb3aef4ee3
Update the Win32 project files, patch by Razvan Aciu!
...
llvm-svn: 51067
2008-05-13 20:56:51 +00:00
Dale Johannesen
e695ab227c
Fix for PR 2323, infinite loop in tail dup.
...
llvm-svn: 51063
2008-05-13 20:06:43 +00:00
Chris Lattner
03ce206143
add a note
...
llvm-svn: 51062
2008-05-13 19:56:20 +00:00
Evan Cheng
f8ab712fa9
- Fix the pasto in the fix for a previous pasto.
...
- Incorporate Chris' comment suggestion.
llvm-svn: 51061
2008-05-13 18:59:59 +00:00
Chris Lattner
d17f58ae6e
add a note
...
llvm-svn: 51060
2008-05-13 18:48:54 +00:00
Dan Gohman
35a835cb60
s/indicies/indices/ and clarify the extractvalue and insertvalue are
...
working with struct field or array element values. Thanks Duncan!
llvm-svn: 51059
2008-05-13 18:16:06 +00:00
Nate Begeman
6645714f16
Fix one more encoding bug.
...
llvm-svn: 51057
2008-05-13 17:52:09 +00:00
Sanjiv Gupta
f6387983e8
Added configure switches for PIC16 backend.
...
llvm-svn: 51056
2008-05-13 17:37:32 +00:00
Evan Cheng
595e226085
- Don't treat anyext 16-bit load as a 32-bit load if it's volatile.
...
- Correct a pasto.
llvm-svn: 51054
2008-05-13 16:45:56 +00:00
Anton Korobeynikov
5c48bae209
Add thin layer over StringMap to form StringSet. By Mikhail Glushenkov.
...
llvm-svn: 51048
2008-05-13 15:03:16 +00:00
Owen Anderson
8c2391d00d
Make the non-local CSE safety checks slightly more thorough.
...
llvm-svn: 51035
2008-05-13 13:41:23 +00:00
Sanjiv Gupta
4394c2376c
Adding files for Microchip's PIC16 target.
...
A brief description about PIC16:
===============================
PIC16 is an 8-bit microcontroller with only one 8-bit register which is the
accumulator. All arithmetic/load/store operations are 8-bit only.
The architecture has two address spaces: program and data. The program memory
is divided into 2K pages and the data memory is divided into banks of 128 byte, with only 80 usable bytes, resulting in an non-contiguous data memory.
It supports direct data memory access (by specifying the address as part of the instruction) and indirect data and program memory access (in an unorthodox fashion which utilize a 16 bit pointer register).
Two classes of registers exist: (8-bit class which is only one
accumulator) (16-bit class, which contains one or more 16 bit
pointer(s))
llvm-svn: 51027
2008-05-13 09:02:57 +00:00
Evan Cheng
1120279ae6
Instead of a vector load, shuffle and then extract an element. Load the element from address with an offset.
...
pshufd $1, (%rdi), %xmm0
movd %xmm0, %eax
=>
movl 4(%rdi), %eax
llvm-svn: 51026
2008-05-13 08:35:03 +00:00
Owen Anderson
525aa89356
Add a testcase for non-local CSE of read-only calls.
...
llvm-svn: 51025
2008-05-13 08:17:44 +00:00
Owen Anderson
69057b80c7
Add support for non-local CSE of read-only calls.
...
llvm-svn: 51024
2008-05-13 08:17:22 +00:00
Gabor Greif
0d42adf65b
Derive GetResultInst from UnaryInstruction, this simplifies code and removes a FIXME.
...
llvm-svn: 51023
2008-05-13 07:09:08 +00:00
Dan Gohman
0479aa5c0b
Change class' public PassInfo variables to by initialized with the
...
address of the PassInfo directly instead of calling getPassInfo.
This eliminates a bunch of dynamic initializations of static data.
Also, fold RegisterPassBase into PassInfo, make a bunch of its
data members const, and rearrange some code to initialize data
members in constructors instead of using setter member functions.
llvm-svn: 51022
2008-05-13 02:05:11 +00:00
Nate Begeman
53c5c62d6d
80 col / tabs fixes
...
llvm-svn: 51021
2008-05-13 01:48:26 +00:00
Nate Begeman
50f7ef30bb
Fix and encoding error in the psrad xmm, imm8 instruction.
...
llvm-svn: 51020
2008-05-13 01:47:52 +00:00
Evan Cheng
3f40c69083
On x86, it's safe to treat i32 load anyext as a normal i32 load. Ditto for i8 anyext load to i16.
...
llvm-svn: 51019
2008-05-13 00:54:02 +00:00
Dan Gohman
d78c400b5b
Clean up the use of static and anonymous namespaces. This turned up
...
several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Dan Gohman
b9d6660998
Initial documentation for first-class aggregates changes.
...
llvm-svn: 51013
2008-05-12 23:51:09 +00:00
Dan Gohman
43ba067132
Fix a malformed %gt;
...
llvm-svn: 51011
2008-05-12 23:38:42 +00:00
Nate Begeman
b87e63a730
Teach Legalize how to scalarize VSETCC
...
Teach X86 a few more vsetcc patterns. Custom lowering for unsupported ones is next.
llvm-svn: 51009
2008-05-12 23:09:43 +00:00
Evan Cheng
b980f6fb3d
Xform bitconvert(build_pair(load a, load b)) to a single load if the load locations are at the right offset from each other.
...
llvm-svn: 51008
2008-05-12 23:04:07 +00:00
Dale Johannesen
e6942c31ea
New test for tail merging
...
llvm-svn: 51007
2008-05-12 22:59:44 +00:00
Dale Johannesen
9d29283fc7
Be more aggressive about tail-merging small blocks
...
if those blocks consist entirely of common instructions;
merging will not add an extra branch in this case.
llvm-svn: 51006
2008-05-12 22:53:12 +00:00
Bill Wendling
6b8bd513d4
Constify isSourceDefinedByImplicitDef function. Otherwise, just formatting
...
changes that don't change functionality.
llvm-svn: 51004
2008-05-12 22:15:05 +00:00
Bill Wendling
1e11768a4f
Constify the machine instruction passed into the
...
"is{Trivially,Really}ReMaterializable" methods.
llvm-svn: 51001
2008-05-12 20:54:26 +00:00
Nate Begeman
d875c3e2fd
Initial X86 codegen support for VSETCC.
...
llvm-svn: 51000
2008-05-12 20:34:32 +00:00
Dale Johannesen
c4c4d8e1f7
Further rework of tail merge algorithm. Not quite
...
semantically identical, but little difference in
either results or execution speed; but it's much
easier to read, at least IMO.
llvm-svn: 50999
2008-05-12 20:33:57 +00:00
Nate Begeman
68586bddb1
Simplify some checks
...
llvm-svn: 50998
2008-05-12 20:33:52 +00:00
Dan Gohman
0863b19ae6
Fix a copy+paste bug; pseudo-instructions shouldn't have
...
encoding information.
llvm-svn: 50997
2008-05-12 20:22:45 +00:00
Nate Begeman
17c5434a16
Pointer comparisons should use icmp, not vicmp
...
llvm-svn: 50996
2008-05-12 20:16:55 +00:00
Owen Anderson
f792860255
Go back to passing the analyses around as parameters.
...
llvm-svn: 50995
2008-05-12 20:15:55 +00:00
Nate Begeman
66d0a0e8f4
Pointer comparisons should be handled by icmp, not vicmp :)
...
llvm-svn: 50994
2008-05-12 20:11:05 +00:00
Evan Cheng
5f52142ee0
Forgot this.
...
llvm-svn: 50993
2008-05-12 20:08:05 +00:00
Nate Begeman
1196287522
Hard code CmpInst back to i1 for now while I go track down what in the bitcode reader/writer is assuming i1
...
This was breaking a bunch of tests
llvm-svn: 50992
2008-05-12 20:01:56 +00:00
Evan Cheng
2609d5e779
Refactor isConsecutiveLoad from X86 to TargetLowering so DAG combiner can make use of it.
...
llvm-svn: 50991
2008-05-12 19:56:52 +00:00
Bill Wendling
2930845065
Revert the previous commit. Go ahead and hoist rematerializable instructions.
...
llvm-svn: 50990
2008-05-12 19:47:18 +00:00
Nate Begeman
cfcb56091b
Add support for vicmp/vfcmp codegen, more legalize support coming.
...
This is necessary to unbreak the build.
llvm-svn: 50988
2008-05-12 19:40:03 +00:00
Bill Wendling
70613b84da
One real change - don't hoist something that's trivially rematerializable. It's
...
possible for it to produce worse code than before.
The rest of this patch is code cleanup.
llvm-svn: 50987
2008-05-12 19:38:32 +00:00
Nate Begeman
ac7f3d99dd
Fix build breakage
...
llvm-svn: 50986
2008-05-12 19:23:22 +00:00
Nate Begeman
d21957002a
Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRef
...
for details. CodeGen support coming in a follow up patch
llvm-svn: 50985
2008-05-12 19:01:56 +00:00
Dan Gohman
02e5933fa3
Make firstEightPowers const.
...
llvm-svn: 50975
2008-05-12 16:38:14 +00:00
Dan Gohman
e9bc2ba256
Update comments.
...
llvm-svn: 50974
2008-05-12 16:34:30 +00:00
Mikhail Glushenkov
c79304461a
Filter option names to escape symbols not allowed as C++ identifiers.
...
Makes it possible to use options with names like "Wa,".
Also fixes the -Wall option handling as a side-effect.
llvm-svn: 50973
2008-05-12 16:33:06 +00:00
Mikhail Glushenkov
3f896c8d16
Make it possible to choose between different compilation graph definitions at compile-time.
...
llvm-svn: 50972
2008-05-12 16:32:24 +00:00
Mikhail Glushenkov
128349b8bf
Fix some error messages; Make LLVMC pass through the exit code of a failed tool.
...
llvm-svn: 50971
2008-05-12 16:31:42 +00:00
Dan Gohman
906716c40f
Fix a compile error on compilers that still want a return value
...
in a non-void function that calls abort.
llvm-svn: 50969
2008-05-12 16:17:19 +00:00
Dan Gohman
ecb77385ab
Fix a missing break in the ISD::FLT_ROUNDS_ handling. Patch by giuma!
...
llvm-svn: 50967
2008-05-12 16:07:15 +00:00
Duncan Sands
2b84ba4c9b
Testcase for PR2264.
...
llvm-svn: 50965
2008-05-12 13:01:19 +00:00
Owen Anderson
4afb1c864a
Move the various analyses used by GVN into static variables so we don't have to keep passing them around or refetching them.
...
llvm-svn: 50963
2008-05-12 08:15:27 +00:00
Chris Lattner
9fdb814a56
prune #includes.
...
llvm-svn: 50962
2008-05-12 01:13:53 +00:00
Chris Lattner
5287765d1a
Add a new SparsePropagation analysis utility, which allows you to do
...
SCCP like sparse lattice analysis with relative ease. Just pick your
lattice function and implement the transfer function and you're good.
Just make sure you don't break monotonicity ;-)
llvm-svn: 50961
2008-05-12 01:12:24 +00:00
Nick Lewycky
c38c1712f7
Make constructors target-specific. This fixes problems where the path would
...
include backslashes on Windows. This should fix llvm-ld problems on win32.
llvm-svn: 50960
2008-05-11 17:37:40 +00:00
Anton Korobeynikov
a38e72d247
Add note
...
llvm-svn: 50959
2008-05-11 14:33:15 +00:00
Chris Lattner
47fed61526
Fix various DOUTs to not call the extremely expensive Value::getName()
...
method. DOUT statements are disabled when assertions are off, but the
side effects of getName() are still evaluated. Just call getNameSTart,
which is close enough and doesn't cause heap traffic.
llvm-svn: 50958
2008-05-11 01:55:59 +00:00
Chris Lattner
82146fa267
Simplify code by using SwitchInst::findCaseValue instead of reimplementing it.
...
llvm-svn: 50957
2008-05-10 23:56:54 +00:00
Bill Wendling
9fbd6e7e8c
Remove warnings when using -Wshorten-64-to-32.
...
llvm-svn: 50952
2008-05-10 19:59:59 +00:00
Duncan Sands
8111b67ca8
Testcase for PR2303.
...
llvm-svn: 50951
2008-05-10 16:43:10 +00:00
Anton Korobeynikov
acbdaa2406
Fix linking of internal aliases
...
llvm-svn: 50950
2008-05-10 14:41:43 +00:00
Bill Wendling
7385b08d34
Prevent -W64-to-32-shortened warnings.
...
llvm-svn: 50947
2008-05-10 11:26:52 +00:00
Bill Wendling
a6c46c2f21
Prevent warnings from the -Wshorten-64-to-32 flag.
...
llvm-svn: 50946
2008-05-10 10:58:07 +00:00
Gabor Greif
a1f949a2df
remove commented-out code, it is subsumed by DECLARE_TRANSPARENT_OPERAND_ACCESSORS
...
llvm-svn: 50944
2008-05-10 09:36:58 +00:00
Gabor Greif
f6caff66a1
merge of use-diet branch to trunk
...
llvm-svn: 50943
2008-05-10 08:32:32 +00:00
Owen Anderson
18709fef4a
Re-enable loop deletion by default.
...
llvm-svn: 50941
2008-05-10 07:10:24 +00:00
Evan Cheng
71b9afb053
When transforming a vector_shuffle to a load, the base address must not be an undef.
...
llvm-svn: 50940
2008-05-10 06:46:49 +00:00
Tanya Lattner
b93cfdb48a
Set to 2.4 and regenerate configure.
...
llvm-svn: 50935
2008-05-10 04:20:38 +00:00
Evan Cheng
9c4d685165
Add nounwind.
...
llvm-svn: 50931
2008-05-10 02:22:25 +00:00
Dan Gohman
3c0e11af64
For now, abort when an ISD::VAARG is encountered on x86-64, rather
...
than silently generate invalid code.
llvm-gcc does not currently use VAArgInst; it lowers va_arg in the
front-end.
llvm-svn: 50930
2008-05-10 01:26:14 +00:00
Evan Cheng
da2587cedc
Some clean up.
...
llvm-svn: 50929
2008-05-10 00:59:18 +00:00
Evan Cheng
bb48d55a88
If movl top bits are undef, let it be selected to movlps, etc.
...
llvm-svn: 50928
2008-05-10 00:58:41 +00:00
Evan Cheng
bec201fa06
If all sources of a PHI node are defined by an implicit_def, just emit an implicit_def instead of a copy.
...
llvm-svn: 50927
2008-05-10 00:17:50 +00:00
Bill Wendling
19e3c857b8
Cosmetic changes:
...
- Comment fixes.
- Moar whitespace.
- Made ivars "private" by default.
No functionality change.
llvm-svn: 50926
2008-05-10 00:12:52 +00:00
Evan Cheng
867af2678f
Add a pattern to do move the low element of a v4f32 and zero extend the rest.
...
llvm-svn: 50922
2008-05-09 23:37:55 +00:00
Dale Johannesen
66da8b5334
Remove an evil vector bool. Cosmetic refactoring,
...
no functional change.
llvm-svn: 50921
2008-05-09 23:28:24 +00:00
Evan Cheng
961339bbdb
Handle a few more cases of folding load i64 into xmm and zero top bits.
...
Note, some of the code will be moved into target independent part of DAG combiner in a subsequent patch.
llvm-svn: 50918
2008-05-09 21:53:03 +00:00
Evan Cheng
7f76852a50
Make OpActionsCapacity multiple of 4.
...
llvm-svn: 50917
2008-05-09 21:50:23 +00:00
Dale Johannesen
cff7df201c
Rewrite tail merging algorithm to handle the
...
case where there are multiple blocks with a large
number of common tail instructions more efficiently
(compile time optimization).
llvm-svn: 50916
2008-05-09 21:24:35 +00:00
Torok Edwin
42d46f2aa3
put LibCallAliasAnalysis into anonymous namespace to avoid
...
clashes on ::X
llvm-svn: 50912
2008-05-09 20:35:45 +00:00
Evan Cheng
0352e63e39
Simplify test.
...
llvm-svn: 50911
2008-05-09 19:56:32 +00:00
Mikhail Glushenkov
4ae55648bc
Rename Example.td to Graph.td.
...
llvm-svn: 50910
2008-05-09 19:11:28 +00:00
Nick Kledzik
db18f328d7
use doxygen comments for makeBuffer()
...
llvm-svn: 50908
2008-05-09 18:44:41 +00:00
Chris Lattner
a4ee1f516f
don't sink invokes, even if they are readonly. This fixes a
...
crash on kimwitu++.
llvm-svn: 50901
2008-05-09 15:07:33 +00:00
Duncan Sands
437435dcbc
Fix a type and formatting.
...
llvm-svn: 50900
2008-05-09 12:20:10 +00:00
Mikhail Glushenkov
22ce861ffe
Reapply 50867: A small refactoring (extract method) + some comment fixes.
...
Fixed the build breakage, sorry for that.
llvm-svn: 50895
2008-05-09 08:27:26 +00:00
Chris Lattner
f2e4cfd7e2
add support for pattern matching 'neg'
...
llvm-svn: 50883
2008-05-09 05:20:27 +00:00
Chris Lattner
aaba10e843
Implement PR2298. This transforms:
...
~x < ~y --> y < x
-x == -y --> x == y
llvm-svn: 50882
2008-05-09 05:19:28 +00:00
Chris Lattner
e7f0afe168
restore doxygen comment.
...
llvm-svn: 50881
2008-05-09 04:43:13 +00:00
Nick Kledzik
63b6127a73
<rdar://problem/5917641> use getMemBufferCopy if supplied buffer is not already zero terminated
...
llvm-svn: 50880
2008-05-09 01:09:59 +00:00
Anton Korobeynikov
a50eed4af9
Check for validity of aliasee pointer before dereference.
...
llvm-svn: 50878
2008-05-08 23:11:06 +00:00
Evan Cheng
0360ecbec1
Use movq to move low half of XMM register and zero-extend the rest.
...
llvm-svn: 50874
2008-05-08 22:35:02 +00:00
Chris Lattner
954907aa6f
conservatively say that volatile stores read memory.
...
llvm-svn: 50872
2008-05-08 21:58:49 +00:00
Tanya Lattner
93cea9fd18
Revertin 50867 since it was breaking the build.
...
llvm-svn: 50871
2008-05-08 21:54:20 +00:00
Chris Lattner
c2e108430f
store can't read from memory.
...
llvm-svn: 50869
2008-05-08 21:47:43 +00:00
Mikhail Glushenkov
e75ac17eaa
Add -E and -S options
...
llvm-svn: 50868
2008-05-08 20:02:36 +00:00
Mikhail Glushenkov
d7e151f868
A small refactoring (extract method) + some comment fixes.
...
llvm-svn: 50867
2008-05-08 20:02:03 +00:00
Chris Lattner
d12c519b74
Remove dead return. Thanks to Bill for the review!
...
llvm-svn: 50863
2008-05-08 18:26:56 +00:00
Gordon Henriksen
829046b0b4
Improve pass documentation and comments.
...
Patch by Matthijs Kooijman!
llvm-svn: 50861
2008-05-08 17:46:35 +00:00
Chris Lattner
49a594e6ab
More than just loads can read from memory: readonly calls like strlen
...
also need to be checked for memory modifying instructions before we
can sink them. THis fixes the second half of PR2297.
llvm-svn: 50860
2008-05-08 17:37:37 +00:00
Chris Lattner
4fa09669d8
Make instcombine's DSE respect loads as well as stores. It is not safe to
...
delete the first store in:
store x -> p
load p
store y -> p
This is for PR2297.
llvm-svn: 50859
2008-05-08 17:20:30 +00:00
Chris Lattner
8462711ce8
add a new Instruction::mayReadFromMemory predicate, make
...
Instruction::mayWriteToMemory stronger for invokes.
llvm-svn: 50858
2008-05-08 17:16:51 +00:00
Devang Patel
4758caa926
Check linkage.
...
llvm-svn: 50851
2008-05-08 15:08:39 +00:00
Duncan Sands
9897eee483
Get exception handling working again on 64 bit
...
Darwin. This is a hack of course, but it does
at least look at the right thing: gotpcrel means
that this is already an offset, so an explicit
offset is not needed (and wrong). I think this
is good enough for the moment: Anton is working
on something better.
llvm-svn: 50850
2008-05-08 12:33:11 +00:00
Chris Lattner
d93ff087ba
new testcase.
...
llvm-svn: 50841
2008-05-08 04:55:51 +00:00
Chris Lattner
f4b42f545b
Add support for constant folding the 'offsetof' pattern even if the
...
base is not zero. This fixes test/C++Frontend/2008-05-07-CrazyOffsetOf.cpp
llvm-svn: 50840
2008-05-08 04:54:43 +00:00
Evan Cheng
78af38c392
Handle vector move / load which zero the destination register top bits (i.e. movd, movq, movss (addr), movsd (addr)) with X86 specific dag combine.
...
llvm-svn: 50838
2008-05-08 00:57:18 +00:00
Evan Cheng
0d6311d46c
Add nounwind.
...
llvm-svn: 50837
2008-05-07 22:59:08 +00:00
Anton Korobeynikov
fc2edad4ae
Turn StripPointerCast() into a method
...
llvm-svn: 50836
2008-05-07 22:54:15 +00:00
Mikhail Glushenkov
41318a15d0
Use Doxygen-style comments.
...
llvm-svn: 50833
2008-05-07 21:50:19 +00:00
Ted Kremenek
dac0391218
Make the interface of CStrInCStrNoCase be the same as strcasestr.
...
llvm-svn: 50828
2008-05-07 20:04:18 +00:00
Chris Lattner
621d33bbc0
Add a new LibCallAliasAnalysis pass, which is parameterized
...
by an instance of LibCallInfo to provide mod/ref info of
standard library functions. This is powerful enough to
say that 'sqrt' is readonly except that it modifies errno,
or that "printf doesn't store to memory unless the %n
constraint is present" etc.
llvm-svn: 50827
2008-05-07 19:53:05 +00:00
Ted Kremenek
7b66ad294b
Fix some serious logical errors in CStrInCStrNoCase pointed out by Bill.
...
llvm-svn: 50826
2008-05-07 19:22:36 +00:00
Duncan Sands
e2b0bf43a7
Output correct exception handling and frame info
...
on x86-64 linux. This causes no regressions on
32 bit linux and 32 bit ppc. More tests pass
on 64 bit ppc with no regressions. I didn't
turn on eh on 64 bit linux because the intrinsics
needed to compile the eh runtime aren't done
yet. But if you turn it on and link with the
mainline runtime then eh seems to work fine
on x86-64 linux with this patch. Thanks to
Dale for testing. The main point of the patch
is that if you output that some object is
encoded using 4 bytes you had better not output
8 bytes for it: the patch makes everything
consistent.
llvm-svn: 50825
2008-05-07 19:11:09 +00:00
Ted Kremenek
13bbdf2389
Guard for empty strings in CStrInCStrNoCase.
...
llvm-svn: 50823
2008-05-07 18:49:31 +00:00
Ted Kremenek
3a9fa4e360
Added CStrInCStrNoCase, a portable implementation of strcasestr.
...
llvm-svn: 50821
2008-05-07 18:35:46 +00:00
Chris Lattner
9a35f1b702
Add a new interface for describing the behavior of library calls. This
...
Currently is sufficient to describe mod/ref behavior but will hopefully
eventually be extended for other purposes.
This isn't used by anything yet.
llvm-svn: 50820
2008-05-07 18:21:13 +00:00
Nick Lewycky
5fcecbffca
Typo.
...
llvm-svn: 50805
2008-05-07 06:39:04 +00:00
Evan Cheng
7ca4a67ca1
Yet another nasty spiller bug.
...
%ecx = op
store %cl<kill>, (addr)
(addr) = op %al
It's not safe to unfold the last operand and eliminate store even though %cl is marked kill. It's a sub-register use which means one of its super-register(s) may be used below.
llvm-svn: 50794
2008-05-07 00:49:28 +00:00
Dan Gohman
5a3eecdfd8
Fix a bug in the ComputeMaskedBits logic for multiply.
...
llvm-svn: 50793
2008-05-07 00:35:55 +00:00
Bill Wendling
13a15700fc
Make the use of the "noinline" attribute conditional on using GCC.
...
llvm-svn: 50789
2008-05-07 00:00:34 +00:00
Owen Anderson
0d84582dc0
Disable loop deletion until the release branch.
...
llvm-svn: 50787
2008-05-06 23:56:34 +00:00
Bill Wendling
8f3d737dcd
Removing.
...
llvm-svn: 50786
2008-05-06 23:56:22 +00:00
Bill Wendling
d054e15fe3
Workaround for a compiler bug (see <rdar://problem/5852746>). Once that bug is
...
fixed, revert this patch.
llvm-svn: 50782
2008-05-06 23:30:02 +00:00
Steve Naroff
51b2a18084
Update a couple VC++ project files.
...
llvm-svn: 50780
2008-05-06 23:14:34 +00:00
Anton Korobeynikov
f5d2c3b45a
Use target triple in tests, not 'realign-stack=0' option. Per request.
...
llvm-svn: 50778
2008-05-06 23:09:29 +00:00
Anton Korobeynikov
09cfb1cf2d
If weak GlobalVariable was bitcast'ed to different type during linking
...
we will need to strip all casts for intializer lookup.
llvm-svn: 50776
2008-05-06 22:52:54 +00:00
Anton Korobeynikov
82c02b28f3
Make StripPointerCast a common function (should we mak it method of Value instead?)
...
llvm-svn: 50775
2008-05-06 22:52:30 +00:00
Owen Anderson
ec9d8558d5
Testcase for r50770.
...
llvm-svn: 50771
2008-05-06 21:01:34 +00:00
Owen Anderson
0e1ab4a9be
We need to update PHIs containing the exiting block, not the exit block. We really should come up with better names for these.
...
llvm-svn: 50770
2008-05-06 20:55:16 +00:00
Gordon Henriksen
6ea927b1d7
Improve documentation.
...
llvm-svn: 50768
2008-05-06 19:17:01 +00:00
Mikhail Glushenkov
eeac27e38c
Change from llvm::SmallSet<std::string> to llvm::StringMap<char>.
...
llvm-svn: 50766
2008-05-06 18:18:58 +00:00
Mikhail Glushenkov
5e9d6a3dd8
Add new edge property combinator: weight.
...
llvm-svn: 50765
2008-05-06 18:18:20 +00:00
Mikhail Glushenkov
bfc8954a65
Add a help string for the -c option
...
llvm-svn: 50764
2008-05-06 18:17:42 +00:00
Mikhail Glushenkov
7e415c4c18
Update documentation to reflect the current state of affairs.
...
llvm-svn: 50763
2008-05-06 18:17:19 +00:00
Mikhail Glushenkov
0ca372a6be
Some cosmetic changes (change some comments, move code around a bit).
...
llvm-svn: 50762
2008-05-06 18:16:52 +00:00
Mikhail Glushenkov
260d83068b
Move test files around a bit - fixes the reported number of test cases.
...
llvm-svn: 50761
2008-05-06 18:16:20 +00:00
Mikhail Glushenkov
de7fad129d
Refactoring: split the function CompilationGraph::Build() into two parts.
...
llvm-svn: 50760
2008-05-06 18:15:35 +00:00
Mikhail Glushenkov
a02084cff7
Use edge weights to choose the right linker based on input language names.
...
llvm-svn: 50759
2008-05-06 18:15:12 +00:00
Mikhail Glushenkov
1b056e9e5a
Add weights to graph edges. Choose between edges based on their weight.
...
llvm-svn: 50757
2008-05-06 18:14:24 +00:00
Mikhail Glushenkov
3a2f5c423e
Remove the UnpackValues() function.
...
llvm-svn: 50756
2008-05-06 18:13:45 +00:00
Mikhail Glushenkov
7f6ed20009
Add a --linker command-line option, make all tests pass.
...
llvm-svn: 50755
2008-05-06 18:13:00 +00:00
Mikhail Glushenkov
20c18c344b
Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.
...
llvm-svn: 50754
2008-05-06 18:12:03 +00:00
Mikhail Glushenkov
7f417b08cf
Add two (currently failing) tests.
...
llvm-svn: 50752
2008-05-06 18:11:21 +00:00
Mikhail Glushenkov
fc905c64ab
Add -x option (like in gcc).
...
llvm-svn: 50750
2008-05-06 18:10:53 +00:00
Mikhail Glushenkov
baacf0d692
Take object file as input and handle files with the same name correctly.
...
llvm-svn: 50749
2008-05-06 18:10:20 +00:00
Mikhail Glushenkov
1002d5f33f
Rename LLVMCCConfigurationEmitter to LLVMCConfigurationEmitter
...
llvm-svn: 50748
2008-05-06 18:09:29 +00:00
Mikhail Glushenkov
d4918dd32c
Add output redirection, rename namespace llvmcc to namespace llvmc.
...
llvm-svn: 50746
2008-05-06 18:08:59 +00:00
Mikhail Glushenkov
2eb0268fab
Make AutoGenerated.inc depend also on Tools.td and Common.td
...
llvm-svn: 50745
2008-05-06 18:08:12 +00:00
Mikhail Glushenkov
73d866efda
Utilize topological sort in CompilationGraph::Build().
...
This makes more interesting graph topologies possible. Currently all tests pass,
but more testing is needed.
llvm-svn: 50744
2008-05-06 18:07:48 +00:00
Mikhail Glushenkov
7701512231
Add TopologicalSort method to CompilationGraph.
...
llvm-svn: 50743
2008-05-06 18:07:14 +00:00
Mikhail Glushenkov
af932f0d96
Do not require positional arguments when we're only printing out the graph.
...
llvm-svn: 50742
2008-05-06 17:44:16 +00:00
Mikhail Glushenkov
0620d0ca47
Make ChooseEdge more generic and use it to choose between different toolchains.
...
llvm-svn: 50741
2008-05-06 17:28:03 +00:00
Mikhail Glushenkov
891c14d1f1
Remove unnecessary argument from PassThroughGraph
...
llvm-svn: 50740
2008-05-06 17:27:37 +00:00
Mikhail Glushenkov
7ed45e2261
Small output formatting fix.
...
llvm-svn: 50739
2008-05-06 17:27:15 +00:00
Mikhail Glushenkov
2709e1a2c9
Add inward edge counters to Nodes; Associate JoinLists with JoinTools.
...
llvm-svn: 50738
2008-05-06 17:26:53 +00:00
Mikhail Glushenkov
ee81aa3812
Enhancements for --view-graph
...
llvm-svn: 50737
2008-05-06 17:26:14 +00:00
Mikhail Glushenkov
be23113e93
Split the Build function into two parts.
...
llvm-svn: 50736
2008-05-06 17:25:51 +00:00
Mikhail Glushenkov
af15882a5a
Make llvmc return 1 when the compilation fails.
...
llvm-svn: 50735
2008-05-06 17:25:23 +00:00
Mikhail Glushenkov
07597594b2
First small tests for llvmc2.
...
llvm-svn: 50734
2008-05-06 17:24:54 +00:00
Mikhail Glushenkov
baa0b592d0
Return const char* instead of std::string in Tool classes
...
llvm-svn: 50733
2008-05-06 17:24:26 +00:00
Mikhail Glushenkov
6ec1761ef6
Add an ability to choose between different edges based on edge properties.
...
llvm-svn: 50732
2008-05-06 17:23:50 +00:00
Mikhail Glushenkov
1c41c6d734
Refactoring: extract method.
...
llvm-svn: 50731
2008-05-06 17:23:14 +00:00
Mikhail Glushenkov
59eb254092
Add new edge properties: parameter_equals, element_in_list, and.
...
llvm-svn: 50730
2008-05-06 17:22:47 +00:00
Mikhail Glushenkov
681df41f2c
Implemented switch_on edge property.
...
llvm-svn: 50729
2008-05-06 17:22:03 +00:00
Mikhail Glushenkov
39a9335241
Cosmetic change: if( -> if (
...
llvm-svn: 50728
2008-05-06 16:37:33 +00:00
Mikhail Glushenkov
abd7cc7238
Remove ExampleWithOpt.td: this file was merged with Example.td.
...
llvm-svn: 50727
2008-05-06 16:37:12 +00:00
Mikhail Glushenkov
251280ce0b
More work on edge properties. Use Edge classes instead of strings in CompilationGraph.
...
llvm-svn: 50726
2008-05-06 16:36:50 +00:00
Mikhail Glushenkov
459df48de7
Ongoing work: add an edge typechecker, rudimentary support for edge properties.
...
llvm-svn: 50725
2008-05-06 16:36:06 +00:00
Mikhail Glushenkov
adcb08d1b3
Convert internal representation to use DAG. This gives us more flexibility and enables future improvements.
...
llvm-svn: 50724
2008-05-06 16:35:25 +00:00
Mikhail Glushenkov
8190616359
Small const-correctness fix
...
llvm-svn: 50723
2008-05-06 16:34:39 +00:00
Mikhail Glushenkov
a8276c5323
Code reorg
...
llvm-svn: 50722
2008-05-06 16:34:12 +00:00
Duncan Sands
bceec3a9ef
Testcase for PR2292.
...
llvm-svn: 50718
2008-05-06 14:56:40 +00:00
Bill Wendling
557ecd8670
Remove tar ball from installed directory.
...
llvm-svn: 50717
2008-05-06 08:33:07 +00:00
Evan Cheng
ef3faa1b1c
Fix PR2287. Darwin passes mmx values in register in 64-mode, not Linux.
...
llvm-svn: 50716
2008-05-06 07:23:50 +00:00
Devang Patel
7ffc3c9a95
Fix typo.
...
llvm-svn: 50713
2008-05-06 05:40:11 +00:00
Nick Lewycky
f0bdd22ffd
Fix typo and indentation.
...
llvm-svn: 50706
2008-05-06 04:03:18 +00:00
Nick Lewycky
25f08069ae
Fix renamePathOnDisk on Win32, patch from David Leon. This fixes problems with
...
llvm-ar being unable to rename files.
llvm-svn: 50702
2008-05-06 03:42:21 +00:00
Chris Lattner
de68fabb35
fix typo Duncan noticed
...
llvm-svn: 50699
2008-05-06 02:31:18 +00:00
Chris Lattner
888594bdf4
Match things like 'armv5tejl-unknown-linux-gnu' for PR2290
...
llvm-svn: 50698
2008-05-06 02:29:28 +00:00
Dan Gohman
6a2da37c0e
Make several variable declarations static.
...
llvm-svn: 50696
2008-05-06 01:53:16 +00:00
Dan Gohman
a8b7e78f54
Remove uses of llvm/System/IncludeFile.h that are no longer needed.
...
llvm-svn: 50695
2008-05-06 01:32:53 +00:00
Dan Gohman
38dc08f36f
Instead of enumerating each opcode that isn't handled that
...
ComputeMaskedBits handles, just use a 'default:'. This avoids
TargetLowering's list getting out of date with SelectionDAG's.
llvm-svn: 50693
2008-05-06 00:53:29 +00:00
Dan Gohman
cf0e3acf16
Correct the value of LowBits in srem and urem handling in
...
ComputeMaskedBits.
llvm-svn: 50692
2008-05-06 00:51:48 +00:00
Dan Gohman
72a0bc148c
Fix a broken doxygen comment, and reword it for clarity.
...
llvm-svn: 50687
2008-05-06 00:20:10 +00:00
Owen Anderson
7db342b0a8
Enable dead loop elimination.
...
llvm-svn: 50682
2008-05-05 23:38:07 +00:00
Chris Lattner
6e2bf7c67e
add a micro optzn.
...
llvm-svn: 50681
2008-05-05 23:19:45 +00:00
Mon P Wang
310a38d51e
Improved generated code for atomic operators
...
llvm-svn: 50677
2008-05-05 22:56:23 +00:00
Evan Cheng
dbfcce37fe
Code clean up. No functionality change.
...
llvm-svn: 50675
2008-05-05 22:12:23 +00:00
Bill Wendling
4ead264c08
Fix: Some classes were derived from a class in an anonymous namespace, but they
...
themselves weren't in the anonymous namespace.
llvm-svn: 50673
2008-05-05 21:37:59 +00:00
Bill Wendling
31ce28c561
Using "unsigned" was masking the "size_t" version of this method.
...
llvm-svn: 50668
2008-05-05 20:51:58 +00:00
Chris Lattner
8ed8e3d0e6
Fix a crash when threading a block that includes a MRV call result.
...
DemoteRegToStack doesn't work with MRVs yet, because it relies on the
ability to load/store things.
This fixes PR2285.
llvm-svn: 50667
2008-05-05 20:21:22 +00:00
Devang Patel
698de320d8
Remove unused function.
...
llvm-svn: 50664
2008-05-05 19:44:16 +00:00
Mon P Wang
3e58393c3d
Added addition atomic instrinsics and, or, xor, min, and max.
...
llvm-svn: 50663
2008-05-05 19:05:59 +00:00
Dan Gohman
b42c28c3dc
Fix IsLinux being uninitialized on non-Linux targets.
...
llvm-svn: 50660
2008-05-05 18:43:07 +00:00
Evan Cheng
86cb31862f
Fix more -Wshorten-64-to-32 warnings.
...
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Chris Lattner
9c0c60d080
no need for eh info
...
llvm-svn: 50658
2008-05-05 18:24:33 +00:00
Evan Cheng
b8c818026c
Fix 80 column violations.
...
llvm-svn: 50655
2008-05-05 17:41:03 +00:00
Anton Korobeynikov
4b0386ce62
Fix 80col violation
...
llvm-svn: 50654
2008-05-05 17:08:59 +00:00
Dan Gohman
e3a63ba3cd
Fix a bug in the ELF writer that caused it to produce malformed
...
ELF headers. The ELF writer still isn't generally usable though.
llvm-svn: 50652
2008-05-05 16:48:32 +00:00
Dan Gohman
6fd71c6512
Use a dedicated IsLinux flag instead of an ELFLinux TargetType.
...
llvm-svn: 50649
2008-05-05 16:11:31 +00:00
Dan Gohman
bcde172222
Add AsmPrinter support for emitting a directive to declare that
...
the code being generated does not require an executable stack.
Also, add target-specific code to make use of this on Linux
on x86.
llvm-svn: 50634
2008-05-05 00:28:39 +00:00
Anton Korobeynikov
9205c8562c
Add General Dynamic TLS model for X86-64. Some parts looks really ugly (look for tlsaddr pattern),
...
but should work. Work is in progress, more models will follow
llvm-svn: 50630
2008-05-04 21:36:32 +00:00
Owen Anderson
9d990dd218
Fix PR1098 by correcting the postdominators analysis.
...
Patch by Florian Brandner.
llvm-svn: 50628
2008-05-04 21:07:35 +00:00
Chris Lattner
304f209a07
remove obsolete method.
...
llvm-svn: 50622
2008-05-04 18:14:55 +00:00
Chris Lattner
c17c8f3ec4
regenerate
...
llvm-svn: 50621
2008-05-04 17:18:47 +00:00
Gordon Henriksen
a735a9c481
Use (void) instead of () in C code.
...
llvm-svn: 50620
2008-05-04 12:55:34 +00:00
Evan Cheng
d9481366e3
Select vector shift with non-immediate i32 shift amount operand by first moving the operand into the right register.
...
llvm-svn: 50619
2008-05-04 09:15:50 +00:00
Torok Edwin
2d7a4d70c3
processStore may delete the instruction, avoid
...
using dyn_cast<> on already freed memory.
llvm-svn: 50618
2008-05-04 08:51:25 +00:00
Anton Korobeynikov
60d2d99b11
Remove entries from here also
...
llvm-svn: 50616
2008-05-04 06:23:44 +00:00
Anton Korobeynikov
625f4fee4d
Drop llvmc also, it will be replaced by shiny new llvmc2
...
llvm-svn: 50615
2008-05-04 06:19:55 +00:00
Anton Korobeynikov
a41f7f8985
Drop llvm2cpp, it's now a llc target
...
llvm-svn: 50614
2008-05-04 06:16:50 +00:00
Torok Edwin
2a45575c71
Implement destructor for PostDominatorTree to eliminate a memory leak.
...
llvm-svn: 50607
2008-05-03 20:25:26 +00:00
Devang Patel
fa0e3c4a92
Handle multiple return values.
...
llvm-svn: 50604
2008-05-03 01:12:15 +00:00
Ted Kremenek
9f620f7d92
Implement operator-> for ImmutableMap iterators.
...
llvm-svn: 50603
2008-05-03 01:05:46 +00:00
Evan Cheng
cdf22f2953
Add separate intrinsics for MMX / SSE shifts with i32 integer operands. This allow us to simplify the horribly complicated matching code.
...
llvm-svn: 50601
2008-05-03 00:52:09 +00:00
Devang Patel
a1ec89fbf1
Do not sink getresult.
...
llvm-svn: 50600
2008-05-03 00:36:30 +00:00
Devang Patel
ab8cacee2d
Add assert.
...
llvm-svn: 50596
2008-05-02 22:13:33 +00:00
Chris Lattner
6238dada27
verify builtin optimization works like gcc.
...
llvm-svn: 50594
2008-05-02 22:07:34 +00:00
Chris Lattner
e3b320bd4b
move libcalls to the same place llvm-gcc has it.
...
llvm-svn: 50593
2008-05-02 22:05:06 +00:00
Dan Gohman
1962c2be6a
Fix a mistake in the computation of leading zeros for udiv.
...
llvm-svn: 50591
2008-05-02 21:30:02 +00:00
Evan Cheng
82b9e96274
Suppress -Wshorten-64-to-32 warnings for 64-bit hosts.
...
llvm-svn: 50590
2008-05-02 21:15:08 +00:00
Chris Lattner
5f0563ceb6
strength reduce exp2 into ldexp, rdar://5852514
...
llvm-svn: 50586
2008-05-02 18:43:35 +00:00
Chris Lattner
a700b2bd0f
add a FIXME so we remember to eventually remove this code.
...
llvm-svn: 50582
2008-05-02 17:18:31 +00:00
Evan Cheng
fa8f9f937a
Undo r50574. We are already ensuring the folded load address is 16-byte aligned.
...
llvm-svn: 50578
2008-05-02 17:01:01 +00:00
Chris Lattner
34931afff7
specify an arch for non-x86 hosts.
...
llvm-svn: 50576
2008-05-02 15:11:58 +00:00