Devang Patel
c0f3b52e65
It is possible that all functions in one module are not being
...
optimized for size. Set OptForSize for each function separately.
llvm-svn: 57182
2008-10-06 18:03:39 +00:00
Dan Gohman
dfe979bcb0
Don't dereference the end() iterator. Thanks to
...
ENABLE_EXPENSIVE_CHECKS for finding this.
llvm-svn: 57181
2008-10-06 18:00:07 +00:00
Devang Patel
ab379c905b
Remove unncessary isDeclaration() checks.
...
llvm-svn: 57179
2008-10-06 17:30:07 +00:00
Matthijs Kooijman
cbe5e16eb5
Allow scalarrepl to treat an all-zero GEP just as bitcast.
...
This includes not marking a GEP involving a vector as unsafe, but only when it
has all zero indices. This allows scalarrepl to work in a few more cases.
llvm-svn: 57177
2008-10-06 16:23:31 +00:00
Chris Lattner
7875876e46
reorder #include order, patch by Kenneth Boyd!
...
llvm-svn: 57148
2008-10-06 03:54:25 +00:00
Chris Lattner
0c41861f39
Add #include to get alloca, patch by Kenneth Boyd!
...
llvm-svn: 57147
2008-10-06 03:53:16 +00:00
Chris Lattner
851e72cd22
fix an incorrect and extremely confusing error message
...
llvm-svn: 57123
2008-10-05 18:24:03 +00:00
Chris Lattner
4744ed5f94
make the autoupgrade code for ret attributes dramatically simpler
...
and actually work. We can now read the llvm 2.3 bc file from PR2849
llvm-svn: 57122
2008-10-05 18:22:09 +00:00
Nuno Lopes
0ea0fce8fe
regenerate
...
llvm-svn: 57114
2008-10-05 16:49:34 +00:00
Nuno Lopes
33b90e3f59
clean ArgTypeListI production: free the PATypeHolder
...
llvm-svn: 57113
2008-10-05 16:49:03 +00:00
Anton Korobeynikov
37e560cde1
Emit type-correct constant null. Also fix a typo.
...
Patch by Robert G. Jakabosky!
llvm-svn: 57110
2008-10-05 15:07:06 +00:00
Anton Korobeynikov
d2aded08ac
Fix weird think-o and unbreak build on all gcc-3.4.x-based platforms (e.g. mingw)
...
llvm-svn: 57106
2008-10-05 08:53:29 +00:00
Chris Lattner
f9325e5f67
this case is matched now.
...
llvm-svn: 57096
2008-10-05 02:16:12 +00:00
Chris Lattner
917a6c1343
rewrite bswap matching to be more general, allowing arbitrary
...
shifting and masking inside a bswap expr. This allows it to handle
the cases from PR2842, which involve the intermediate 'or'
expressions being shifted, not just the input value.
llvm-svn: 57095
2008-10-05 02:13:19 +00:00
Chris Lattner
ca91f265c4
fix a bug where the bswap matcher could match a case involving
...
ashr. It should only apply to lshr.
llvm-svn: 57089
2008-10-05 00:50:57 +00:00
Chris Lattner
2416896b3c
wrap some long lines and expand i32 mul's to libcalls, inspired by a
...
patch by Mikael Lepisto!
llvm-svn: 57077
2008-10-04 21:27:46 +00:00
Oscar Fuentes
b5abd78ab5
CMake: Reflected changes on source file structure. New plugin support
...
for llvmc2 incomplete.
llvm-svn: 57076
2008-10-04 21:18:50 +00:00
Duncan Sands
1d35e9aebe
Ignore loads from and stores to local memory (i.e. allocas)
...
when deciding whether to mark a function readnone/readonly.
Since the pass is currently run before SROA, this may be
quite helpful. Requested by Chris on IRC.
llvm-svn: 57050
2008-10-04 13:24:24 +00:00
Nick Lewycky
fc9bc3cf23
Allow the construction of SCEVs with SCEVCouldNotCompute operands, by
...
implementing folding. Fixes PR2857.
llvm-svn: 57049
2008-10-04 11:19:07 +00:00
Anton Korobeynikov
b52ef06c8c
Revert r56675 - it breaks unwinding runtime everywhere.
...
llvm-svn: 57048
2008-10-04 11:09:36 +00:00
Argyrios Kyrtzidis
a6f9bb7905
Add implementations for sys::Memory::setWritable and sys::Memory::setExecutable on Win32 platform.
...
llvm-svn: 57047
2008-10-04 08:15:32 +00:00
Argyrios Kyrtzidis
68fec886ed
Fix compilation error on MSVC.
...
llvm-svn: 57046
2008-10-04 08:11:49 +00:00
Dan Gohman
13b048268b
Fix fast-isel's handling of atomic instructions. They may
...
expand to multiple basic blocks, in which case fast-isel
needs to informed of which block to use as it resumes
inserting instructions.
llvm-svn: 57040
2008-10-04 00:56:36 +00:00
Dan Gohman
78bb44fcd4
Fix a bug in the local allocator's liveness computation where it
...
was setting kill flags on tied uses in two-address instructions.
The kill flags were causing the allocator to think it could
allocate the use and its tied def in different registers.
llvm-svn: 57039
2008-10-04 00:31:14 +00:00
Dale Johannesen
8c36a1c09c
Make atomic Swap work, 64-bit on x86-32.
...
Make it all work in non-pic mode.
llvm-svn: 57034
2008-10-03 22:25:52 +00:00
Dan Gohman
e21903987f
Clean up some multiple-return-value code that is no longer
...
applicable.
llvm-svn: 57033
2008-10-03 22:21:24 +00:00
Devang Patel
e4924e1026
Fix function attribute verification check.
...
Thanks Duncan!
llvm-svn: 57029
2008-10-03 21:11:02 +00:00
Dale Johannesen
5d60c1ebb1
Pass MemOperand through for 64-bit atomics on 32-bit,
...
incidentally making the case where the memop is a
pointer deref work. Fix cmp-and-swap regression.
llvm-svn: 57027
2008-10-03 19:41:08 +00:00
Devang Patel
f963403b58
Nick Lewycky's patch.
...
While hosting instruction check PHI node.
llvm-svn: 57025
2008-10-03 18:57:37 +00:00
Dan Gohman
b62cd7ea98
Use -1ULL instead of uint64_t(-1), at Anton's suggestion.
...
llvm-svn: 57021
2008-10-03 17:56:45 +00:00
Devang Patel
37165b13e5
Verify function attributes.
...
llvm-svn: 57020
2008-10-03 17:50:00 +00:00
Evan Cheng
8428cfc93b
Fix typos pointed out by Duncan. Also untabify these files.
...
llvm-svn: 57018
2008-10-03 17:11:58 +00:00
Daniel Dunbar
a8c424bf61
Unbreak build.
...
llvm-svn: 57017
2008-10-03 17:11:57 +00:00
Dan Gohman
2c836cf187
Avoid creating two TargetLowering objects for each target.
...
Instead, just create one, and make sure everything that needs
it can access it. Previously most of the SelectionDAGISel
subclasses all had their own TargetLowering object, which was
redundant with the TargetLowering object in the TargetMachine
subclasses, except on Sparc, where SparcTargetMachine
didn't have a TargetLowering object. Change Sparc to work
more like the other targets here.
llvm-svn: 57016
2008-10-03 16:55:19 +00:00
Dan Gohman
eae96ce3ec
Remove an unused field.
...
llvm-svn: 57014
2008-10-03 16:17:33 +00:00
Jim Grosbach
b22ef71d46
On Darwin ARM, memory needs special handling to do JIT. This patch expands
...
this handling to work properly for modifying stub functions, relocations
back to entry points after JIT compilation, etc..
llvm-svn: 57013
2008-10-03 16:17:20 +00:00
Jim Grosbach
332ad5e016
Indexing off by one resulted in errant encoding of source register for
...
reg->reg moves.
llvm-svn: 57011
2008-10-03 15:53:56 +00:00
Jim Grosbach
af929abc01
NeedStub/DoesntNeedStub logic was reversed, leading to not using a stub
...
for global relocations that do need them (libc calls, for example).
llvm-svn: 57010
2008-10-03 15:52:42 +00:00
Nuno Lopes
cbff1d08f2
regenerate
...
llvm-svn: 57009
2008-10-03 15:52:39 +00:00
Nuno Lopes
bc7b224ce4
fix more memleaks in ResolveTypeTo() and ParseGlobalVariable()
...
llvm-svn: 57008
2008-10-03 15:51:46 +00:00
Nuno Lopes
877b7e2128
regenerate with bison 2.3
...
llvm-svn: 57007
2008-10-03 15:45:58 +00:00
Dan Gohman
0d1e9a8e04
Switch the MachineOperand accessors back to the short names like
...
isReg, etc., from isRegister, etc.
llvm-svn: 57006
2008-10-03 15:45:36 +00:00
Nuno Lopes
6d8e67f512
fix memleak in FunctionHeaderH
...
llvm-svn: 57005
2008-10-03 15:44:21 +00:00
Duncan Sands
6e42742d2d
The result of getSetCCResultType (eg: i32) may be larger
...
than the type an i1 is promoted to (eg: i8). Account
for this. Noticed by Tilmann Scheller on CellSPU; he
will hopefully take care of fixing this in LegalizeDAG
and adding a testcase!
llvm-svn: 56997
2008-10-03 07:41:46 +00:00
Duncan Sands
3a813a5d3f
Teach internalize to preserve the callgraph.
...
Why? Because it was there!
llvm-svn: 56996
2008-10-03 07:36:09 +00:00
Nicolas Geoffray
74056ae3d5
Acquire the lock only when necessary. More precisely, do not acquire
...
the lock when calling a method which may materialize the llvm::Function.
llvm-svn: 56995
2008-10-03 07:27:08 +00:00
Owen Anderson
cb4f156b6b
SplitBlock should only attempt to update LoopInfo if it is actually being used.
...
llvm-svn: 56994
2008-10-03 06:55:35 +00:00
Dan Gohman
4e072a75cc
Implement fast-isel support for zero-extending from i1.
...
It turns out that this is a fairly common operation,
and it's easy enough to handle.
llvm-svn: 56990
2008-10-03 01:28:47 +00:00
Dan Gohman
b01a9c94d4
Fix X86FastISel to handle dynamic allocas that have avoided
...
getting inserted into the ValueMap. This avoids infinite
recursion in some rare cases.
llvm-svn: 56989
2008-10-03 01:27:49 +00:00
Dan Gohman
1ab1d31f7a
Optimize conditional branches in X86FastISel. This replaces
...
sequences like this:
sete %al
testb %al, %al
jne LBB11_1
with this:
je LBB11_1
llvm-svn: 56969
2008-10-02 22:15:21 +00:00