Dan Gohman
4ef112be62
APInt-ify the gep scaling code, so that it correctly handles the case where
...
the scale overflows pointer-sized arithmetic. This fixes PR5281.
llvm-svn: 84954
2009-10-23 17:57:43 +00:00
Dan Gohman
41d00ac45b
Make LoopDeletion check the maximum backedge taken count, rather than the
...
exact backedge taken count, when checking for infinite loops. This allows
it to delete loops with multiple exit conditions.
llvm-svn: 84952
2009-10-23 17:10:01 +00:00
Chris Lattner
851193b873
some stuff is done, we still have constantexpr simplification to do.
...
llvm-svn: 84943
2009-10-23 07:00:55 +00:00
Chris Lattner
ccf1e84779
teach libanalysis to simplify vector loads with bitcast sources. This
...
implements something out of Target/README.txt producing:
_foo: ## @foo
movl 4(%esp), %eax
movapd LCPI1_0, %xmm0
movapd %xmm0, (%eax)
ret $4
instead of:
_foo: ## @foo
movl 4(%esp), %eax
movapd _b, %xmm0
mulpd LCPI1_0, %xmm0
addpd _a, %xmm0
movapd %xmm0, (%eax)
ret $4
llvm-svn: 84942
2009-10-23 06:57:37 +00:00
Chris Lattner
59f94c01dd
enhance FoldReinterpretLoadFromConstPtr to handle loads of up to 32
...
bytes (i256).
llvm-svn: 84941
2009-10-23 06:50:36 +00:00
Chris Lattner
ed00b80bf8
teach libanalysis to fold int and fp loads from almost arbitrary
...
non-type-safe constant initializers. This sort of thing happens
quite a bit for 4-byte loads out of string constants, unions,
bitfields, and an interesting endianness check from sqlite, which
is something like this:
const int sqlite3one = 1;
# define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0)
# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)
all of these macros now constant fold away.
This implements PR3152 and is based on a patch started by Eli, but heavily
modified and extended.
llvm-svn: 84936
2009-10-23 06:23:49 +00:00
Tanya Lattner
9d3ba88b1d
Add 2.6 release note.
...
llvm-svn: 84934
2009-10-23 06:20:06 +00:00
Evan Cheng
36f4bd0b62
Update tests for 84931.
...
llvm-svn: 84932
2009-10-23 05:58:34 +00:00
Evan Cheng
8b86efefec
X86 needs critical path anti-dependency breaking.
...
llvm-svn: 84931
2009-10-23 05:57:35 +00:00
Dale Johannesen
0d670b5b92
Commit fixes for half precision I noted in review, so
...
they don't get lost; I don't think the originator has
write access.
llvm-svn: 84928
2009-10-23 04:02:51 +00:00
Bill Wendling
dbe4424c37
This is passing on Darwin PPC.
...
llvm-svn: 84921
2009-10-23 01:37:01 +00:00
Victor Hernandez
2981d1b93d
Minor code cleanup.
...
llvm-svn: 84919
2009-10-23 00:59:10 +00:00
Bill Wendling
6aea1a2a5a
Neuter stack protectors by only checking character arrays. This is what GCC
...
does.
llvm-svn: 84916
2009-10-23 00:01:05 +00:00
David Goodwin
02ad4cb32e
Allow the target to select the level of anti-dependence breaking that should be performed by the post-RA scheduler. The default is none.
...
llvm-svn: 84911
2009-10-22 23:19:17 +00:00
Ted Kremenek
b5cd6233b1
Use 'waitpid' instead of 'wait'. Basing Program::Wait() on 'wait()' prevents it being correct within a multithreaded context.
...
This address: PR 5277 (Program::Wait is unsafe to call from multiple threads).
Note: If waitpid() turns out to be non-portable, we can add more autoconf magic, or look into
another solution.
llvm-svn: 84903
2009-10-22 22:16:17 +00:00
Jeffrey Yasskin
4546d31235
Try r84890 again (adding ValueMap<>), now that I've tested the compile on
...
gcc-4.4.
llvm-svn: 84902
2009-10-22 22:11:22 +00:00
Eric Christopher
9d2acced69
size_t, not unsigned here to silence a warning.
...
llvm-svn: 84900
2009-10-22 22:06:50 +00:00
Benjamin Kramer
ab304c9237
Random include cleanup.
...
llvm-svn: 84898
2009-10-22 21:49:41 +00:00
Jeffrey Yasskin
86dfc11cdf
Fix OProfileJITEventListener after r84054 renamed CompileUnit to Scope.
...
llvm-svn: 84895
2009-10-22 20:57:35 +00:00
Bill Wendling
4f0b8d7861
Tidying up some code and comments. No functionality change.
...
llvm-svn: 84894
2009-10-22 20:48:59 +00:00
Jeffrey Yasskin
66db004d7e
Revert r84890, which broke the linux build.
...
llvm-svn: 84892
2009-10-22 20:23:43 +00:00
Jeffrey Yasskin
6b80e6e2b7
Add a ValueMap<ValueOrSubclass*, T> type. ValueMap<Value*, T> is safe to use
...
even when keys get RAUWed and deleted during its lifetime. By default the keys
act like WeakVHs, but users can pass a third template parameter to configure
how updates work and whether to do anything beyond updating the map on each
action.
It's also possible to automatically acquire a lock around ValueMap updates
triggered by RAUWs and deletes, to support the ExecutionEngine.
llvm-svn: 84890
2009-10-22 20:10:20 +00:00
Devang Patel
1155fdf6dc
Hide MetadataContext implementation details.
...
llvm-svn: 84886
2009-10-22 19:36:54 +00:00
Devang Patel
6da5dbf3c2
Fix getMDs() interface such that it does not expose implementation details.
...
llvm-svn: 84885
2009-10-22 18:55:16 +00:00
Devang Patel
084679e70a
Using TrackingVH instead of WeakVH or WeakMetadataVH.
...
llvm-svn: 84884
2009-10-22 18:25:28 +00:00
Devang Patel
09c319e269
Sort handler names to ensure deterministic behavior.
...
llvm-svn: 84878
2009-10-22 17:40:37 +00:00
Stuart Hastings
8de31d0e80
Trying again to tweak the top-level Makefile to facilitate an Apple-style build.
...
Now with Clang-compatibility.
llvm-svn: 84872
2009-10-22 17:22:37 +00:00
Bob Wilson
9d763cc3f8
Revert 84843. Evan, this was breaking some of the if-conversion tests.
...
llvm-svn: 84868
2009-10-22 16:52:21 +00:00
Duncan Sands
f34a264c60
Include config.h in order to have HAVE_STDINT_H be defined.
...
In the latest binutils the plugin-api.h needs this - without
it the LLVM gold plugin fails to compile.
llvm-svn: 84861
2009-10-22 16:03:32 +00:00
Nicolas Geoffray
7e8017cce7
Verify that the function and exception table have been allocated
...
before freeing them.
llvm-svn: 84859
2009-10-22 14:35:57 +00:00
Duncan Sands
2a536740a4
Check that accessing a struct field that occurs before the start
...
of the struct (!) works correctly.
llvm-svn: 84853
2009-10-22 12:53:25 +00:00
Duncan Sands
ec0a98f033
Test handling of record fields with negative offsets.
...
llvm-svn: 84851
2009-10-22 10:02:10 +00:00
Benjamin Kramer
c77f8634e5
Shift art to the right to keep GCC from complaining about multi-line comments.
...
llvm-svn: 84849
2009-10-22 09:28:49 +00:00
Evan Cheng
3615b9bef3
Move if-conversion before post-regalloc scheduling so the predicated instruction get scheduled properly.
...
llvm-svn: 84843
2009-10-22 06:48:32 +00:00
Evan Cheng
943f4f41f2
Load / store multiple was missing opportunites when the load / store bundles are at the end of the bb. Test case is already in, the bug is exposed by subsequent commit.
...
llvm-svn: 84842
2009-10-22 06:47:35 +00:00
Chris Lattner
cf7e8947e9
move another load optimization from instcombine -> libanalysis.
...
llvm-svn: 84841
2009-10-22 06:44:07 +00:00
Chris Lattner
51d2f70e32
move 'loading i32 from string' optimization from instcombine
...
to libanalysis. Instcombine shrinking... does this even
make sense???
llvm-svn: 84840
2009-10-22 06:38:35 +00:00
Chris Lattner
1664a4fd86
Move some constant folding logic for loads out of instcombine into
...
Analysis/ConstantFolding.cpp. This doesn't change the behavior of
instcombine but makes other clients of ConstantFoldInstruction
able to handle loads. This was partially extracted from Eli's patch
in PR3152.
llvm-svn: 84836
2009-10-22 06:25:11 +00:00
Evan Cheng
5457a96b63
Trim more includes.
...
llvm-svn: 84832
2009-10-22 05:11:00 +00:00
Evan Cheng
344fcd9d61
Trim include.
...
llvm-svn: 84831
2009-10-22 05:08:49 +00:00
Chris Lattner
3e630653ad
testcase for PR4678 & rdar://7309675
...
llvm-svn: 84830
2009-10-22 04:47:09 +00:00
Mikhail Glushenkov
2300f65e8c
Forgot a declaration.
...
llvm-svn: 84828
2009-10-22 04:15:24 +00:00
Mikhail Glushenkov
3b3e9a1c27
Make 'unset_option' work on list options.
...
llvm-svn: 84827
2009-10-22 04:15:07 +00:00
Chris Lattner
1448799377
fix warning.
...
llvm-svn: 84826
2009-10-22 03:42:27 +00:00
Devang Patel
0fffb49d56
Fix getHandlerNames() interface. Now it populate clinet supplied small vector with handler names.
...
llvm-svn: 84820
2009-10-22 01:01:24 +00:00
Chris Lattner
7a0d49da1b
llvm-ld doesn't throw.
...
llvm-svn: 84819
2009-10-22 00:52:28 +00:00
Chris Lattner
e6be8ce419
this doesn't use EH either.
...
llvm-svn: 84818
2009-10-22 00:50:24 +00:00
Chris Lattner
cc81526176
nothing opt uses can throw, remove the try block and -fexceptions when
...
building opt.
llvm-svn: 84816
2009-10-22 00:46:41 +00:00
Chris Lattner
cfa1911788
Add some command line options for twiddling the default data layout
...
used by opt when a module doesn't specify one. Patch from Kenneth Uildriks!
llvm-svn: 84814
2009-10-22 00:44:10 +00:00
Evan Cheng
0f55e9ce2e
Don't generate sbfx / ubfx with negative lsb field. Patch by David Conrad.
...
llvm-svn: 84813
2009-10-22 00:40:00 +00:00