This is LLVM SVN r102604:
Limit alignment in SmallVector 8, otherwise GCC assumes 16 byte alignment.
opetaror new, and malloc only return 8-byte aligned memory on 32-bit Linux,
which cause a crash if code is compiled with -O3 (or -ftree-vectorize) and some
SmallVector code is vectorized.
RedHat's version (3.4.6 20060404 (Red Hat 3.4.6-11) is buggy, see http://farm.0xacab.net/build/show/6292
FreeBSD's version appears to work, they can pass --enable-llvm, and if make
check passes use it.
All bytecode functions are loaded in a single module, the bounds verifier is
run, and then stack protectors are inserted.
The problem is that when the next bytecode function is loaded, all functions get
run through the verifier again (including those which got the stack protector
applied), and the bounds verifier rejects it (it doesn't know about stack
protectors).
The fix is to skip running the bounds verifier when a function already has the
stack protector applied, when run in libclamav.
This affects only loading of multiple unsigned bytecodes, or an unsigned
bytecode + bytecode.cvd.
Load of a single unsigned bytecode works, and load of multiple signed bytecodes
is not affected (since the verifier is skipped there).
Solaris has 2 greps, one archaic that doesn't know -E and -F,
and one that does. Configure finds the correct one, but
'make check' was using the wrong one.
This patch makes 'lit' substitute 'grep ' with the path to the
correct grep.
Introduce another Reset() method in BumpPtrAllocator that calls a destructor
on all objects it has allocated, if they are all of the same size and alignment.
Use this to destruct all VNInfos allocated in LiveIntervalAnalysis (PR6653).
valnos is not reliable for this purpose, as seen in r99400
(which still leaked, and sometimes caused double frees).
Port LLVM commit r98349:
Author: d0k
Date: Fri Mar 12 07:54:59 2010
New Revision: 98349
Log:
Use StringRef::substr instead of std::string::substr to avoid using a free'd
string temporary. This should fix PR6590.
commit 15467f5ca4d080ee9e5c28c881433d6ec6af33d8
Author: Tanya Lattner <tonic@nondot.org>
Date: Tue Mar 23 17:16:35 2010 +0000
Merge 99032 from mainline.
If call result is in ST0 and it is not being passed to the caller's
caller, then it is not safe to optimize the call into a sibcall since
the call result has to be popped off the x87 stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@99293 91177308-0d34-0410-b5e6-96231b3b80d8
commit d9fe4c59bba5baba38ba7bcf5282d72b72bccda4
Author: Tanya Lattner <tonic@nondot.org>
Date: Tue Mar 23 17:15:19 2010 +0000
Merge 98977 from mainline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@99292 91177308-0d34-0410-b5e6-96231b3b80d8
commit 6d9848f18a63a1d7a9dbccfe74020af569c62eb2
Author: Tanya Lattner <tonic@nondot.org>
Date: Tue Mar 23 17:11:51 2010 +0000
Merge r98845 from mainline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@99291 91177308-0d34-0410-b5e6-96231b3b80d8
commit 8c577d8dd275154fdd07bd048f200ab74cefd028
Author: Tanya Lattner <tonic@nondot.org>
Date: Tue Mar 23 17:06:56 2010 +0000
Merge 98561 from mainline.
Avoid sibcall optimization if either caller or callee is using sret semantics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@99290 91177308-0d34-0410-b5e6-96231b3b80d8
commit 00d819742f6b1b80bcffccd94802788166ea1eef
Author: Tanya Lattner <tonic@nondot.org>
Date: Tue Mar 23 16:58:02 2010 +0000
Merge r98416 from mainline.
Fix a typo in ValueTracking that's causing instcombine to delete needed shift instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@99289 91177308-0d34-0410-b5e6-96231b3b80d8
commit 63a535b8c10001cc189647804f311f413d0d9f29
Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Sun Mar 21 20:37:19 2010 +0000
Memoize InlineAsms into the LLVMContext and delete them on shutdown.
Fixes PR803.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99143 91177308-0d34-0410-b5e6-96231b3b80d8
commit 700524ca0d62f3c952aaa6834c6a9792076e2dd6
Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Sat Mar 13 01:26:15 2010 +0000
Delete MDNodes when LLVMContext is destroyed. Previous attempts: r97918, r97788.
Tested: clang debug bootstrap, llvm-gcc bootstrap, `make check-lit`
after configuring with --with-llvmgccdir (and this did run the
FrontendC* tests this time)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98410 91177308-0d34-0410-b5e6-96231b3b80d8
commit 8460da1b03c5138a9d5d4185e005e9da6de2bd47
Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Sun Mar 21 21:17:34 2010 +0000
Move the LLVMContextImpl implementation into a .cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99146 91177308-0d34-0410-b5e6-96231b3b80d8
commit 0b20bf7e5e79ec124f03ef11eb88be14b1b69162
Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Sun Mar 21 22:08:41 2010 +0000
Re-add the Metadata.h include to LLVMContextImpl.h so that MDNode is complete
where FoldingSet<MDNode> is instantiated. Clang and MSVC complain; gcc
doesn't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99147 91177308-0d34-0410-b5e6-96231b3b80d8
commit 77e427769a0c1dce88e3cc147aa00b2c0dd7f8dd
Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Mon Mar 22 05:23:37 2010 +0000
Free all Constants in ~LLVMConstantImpl. We avoid assertion failures
by dropping all references from all constants that can use other
constants before trying to destroy any of them.
I also had to free bugpoint's Module in ~BugDriver().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99160 91177308-0d34-0410-b5e6-96231b3b80d8
commit 6dd22e9c0e8ba4e34a4a21574d66c03c004831bb
Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Sat Mar 13 20:09:55 2010 +0000
Allow types that have been forwarded to to be freed.
Tested: make check-lit && valgrind --dsymutil=yes --leak-check=full unittests/ExecutionEngine/JIT/Debug/JITTests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98447 91177308-0d34-0410-b5e6-96231b3b80d8
pthread_cancel is broken on Mac OS X (it only works if the thread
you want to kill calls pthread_testcancel, which is never the situation
when you need async cancelation).
Anyway async cancelation is risky, it may leave bc_ctx in an inconsistent state.
So rather than doing using pthread_cancel (or pthread_kill+siglongjmp)
just insert the timeout checks into the JITed code directly.
These are inserted in each loop, if the loop's tripcount is unknown, or
higher than a threshold. They are also inserted after a certain amount
of APIcalls are made (even in absence of loops).
Note that 'loop' in this sense is not LLVM's notion of a natural loop,
it is simply a BB which is reachable both directly and via a backedge.
For example this doesn't contain natural loops but contains backedges (and a
potential infinite loop):
int foo(int a)
{
int x=4;
if (a == 42)
goto head2;
head:
x++;
head2:
if (a >= 2) {
x += 3;
goto head;
} else if (a >= 0) {
x += 9;
goto head;
}
return x;
}
Squashed commit of the following:
commit aba4d8b895d9ed1f6ce9a811e33bc88b700e9c2a
Author: Tanya Lattner <tonic@nondot.org>
Date: Fri Mar 19 21:30:15 2010 +0000
Update version number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98997 91177308-0d34-0410-b5e6-96231b3b80d8
commit f64efe72c02b91fbef11c8c35b37582f5a853dd6
Author: Tanya Lattner <tonic@nondot.org>
Date: Fri Mar 19 21:29:27 2010 +0000
Merge r98985 from mainline.
Update copyright.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98996 91177308-0d34-0410-b5e6-96231b3b80d8
commit c3285ae5c9154febed002271473063ce22fcac5b
Author: Tanya Lattner <tonic@nondot.org>
Date: Fri Mar 12 00:16:00 2010 +0000
Doc patch for the branch only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98314 91177308-0d34-0410-b5e6-96231b3b80d8
commit 29fc828924d3e2d97583087387a1f4e340265b0d
Author: Tanya Lattner <tonic@nondot.org>
Date: Fri Mar 12 00:12:20 2010 +0000
Merge 97980 from mainline.
Add documentation on sibling call optimization. Rename tailcall2.ll test to sibcall.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98313 91177308-0d34-0410-b5e6-96231b3b80d8
commit dee99b6c2809394cee94ef48596d84ca1a504f04
Author: Tanya Lattner <tonic@nondot.org>
Date: Fri Mar 12 00:10:21 2010 +0000
Merge 97974 from mainline.
Iterator traits and swap. closes PR6548 and PR6549
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98312 91177308-0d34-0410-b5e6-96231b3b80d8
commit ddce60ee159b893f97cf6e4b8448b8a1dbae2c05
Author: Tanya Lattner <tonic@nondot.org>
Date: Fri Mar 12 00:09:10 2010 +0000
Merge 97965 from mainline.
Update the OCaml Kaleidoscope tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98311 91177308-0d34-0410-b5e6-96231b3b80d8
commit b2e6e17cd5adbcd7ec47ebc4eb6d8911869b5098
Author: Tanya Lattner <tonic@nondot.org>
Date: Fri Mar 12 00:03:18 2010 +0000
Merge 98205 from mainline.
Work around a bug in the openbsd assembler on i386,
which doesn't support .quad correctly because it is
"really really old". PR6528.
Yet another reason the mc assembler should take over ;-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98309 91177308-0d34-0410-b5e6-96231b3b80d8
commit d57994abd3dd1a51f5e8d53802e9f5064f4afdb6
Author: Tanya Lattner <tonic@nondot.org>
Date: Fri Mar 12 00:00:12 2010 +0000
Merge 98171 from mainline.
PR6540: Set the newly introduced variables ENABLE_SHARED and
SHLIBPATH_VAR in lit.site.cfg not only in the autoconf build, but also
in a cmake one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98308 91177308-0d34-0410-b5e6-96231b3b80d8
commit ade9f84bba2b16abb28c4fcb4416840e6f611533
Author: Tanya Lattner <tonic@nondot.org>
Date: Thu Mar 11 23:59:04 2010 +0000
Merge 98212 from mainline.
add support, testcases, and dox for the new GHC calling
convention. Patch by David Terei!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98307 91177308-0d34-0410-b5e6-96231b3b80d8
commit 8d6dcb7a7ec280622f7eb60805034b331546df1b
Author: Tanya Lattner <tonic@nondot.org>
Date: Thu Mar 11 23:57:44 2010 +0000
Merge 98203 from mainline.
fix PR6533 by updating the br(xor) code to remember the case
when it looked past a trunc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98306 91177308-0d34-0410-b5e6-96231b3b80d8
commit 1b4b463ed0ac940fad1213a44950426cc5350c9a
Author: Tanya Lattner <tonic@nondot.org>
Date: Thu Mar 11 23:47:58 2010 +0000
Merge r98193 from mainline.
add DESTDIR support for TOOLALIAS, for PR6557, patch by
Matthias Klose!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98303 91177308-0d34-0410-b5e6-96231b3b80d8
commit db315fe7b016fe35c515eded455ede072aa1ef05
Author: Tanya Lattner <tonic@nondot.org>
Date: Thu Mar 11 23:41:22 2010 +0000
Merge 98042.
Don't try to fold V_SET0 and V_SETALLONES to loads in medium and
large code models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98301 91177308-0d34-0410-b5e6-96231b3b80d8
commit aad04d148f0f4cabc6a41c55a49ba2b7e2ea945a
Author: Tanya Lattner <tonic@nondot.org>
Date: Mon Mar 8 05:02:37 2010 +0000
Create 2.7 release branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@97934 91177308-0d34-0410-b5e6-96231b3b80d8
commit 7579f4342e12b45bc8a230680e84dae1c51e1f91
Author: Chris Lattner <sabre@nondot.org>
Date: Mon Mar 8 03:18:28 2010 +0000
remove a non-temporal store pattern which is not tested and
could never have matched because the operand list was backwards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97933 91177308-0d34-0410-b5e6-96231b3b80d8
commit 45f8521ba99fb7fead855cc7af3f173a7d4eca61
Author: Douglas Gregor <doug.gregor@gmail.com>
Date: Mon Mar 8 02:58:37 2010 +0000
Revert r97917, which was causing Clang Debug self-host failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97932 91177308-0d34-0410-b5e6-96231b3b80d8
commit 1c51a8b928528e8f0b3bac4632c8d79bdad1be04
Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Sun Mar 7 19:26:40 2010 +0000
Roll back r97918 again. Just configuring against llvm-gcc wasn't enough to run
the FrontendC* tests. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97921 91177308-0d34-0410-b5e6-96231b3b80d8
commit aa049609074bc577eff2aaba0e76b5e01e79fd52
Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Sun Mar 7 18:46:57 2010 +0000
Reapply r97788 to free MDNodes when the LLVMContext is destroyed. It
bootstraps llvm-gcc this time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97918 91177308-0d34-0410-b5e6-96231b3b80d8
commit 683903d4139e31949ae1bd2fbee40669597109ac
Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Sun Mar 7 17:10:13 2010 +0000
Roll r97906 forward again, without double-deleting CompileUnit::IndexTyDie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97917 91177308-0d34-0410-b5e6-96231b3b80d8
commit 945671d65ee6dcc8784f3d8a9860589f3f7a6f98
Author: Tobias Grosser <grosser@fim.uni-passau.de>
Date: Sun Mar 7 11:15:04 2010 +0000
Add findNearestCommonDominator() for PostDominators.
Add a missing interface to be able to call findNearestCommonDominator
for a PostDominanceTree. The function itself is already implemented in
DominatorTreeBase. The interface however was only added to the
DominatorTree class, but not the PostDominatorClass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97915 91177308-0d34-0410-b5e6-96231b3b80d8
commit e334376b5c7cc9f21c0b05416fbdf6145935a01a
Author: Chris Lattner <sabre@nondot.org>
Date: Sun Mar 7 07:45:08 2010 +0000
Use Other as a sentinel instead of iAny.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97914 91177308-0d34-0410-b5e6-96231b3b80d8
commit 153b35abab0d3d8d6eadf83a3791209ac4c5566b
Author: Chris Lattner <sabre@nondot.org>
Date: Sun Mar 7 07:21:24 2010 +0000
turn off debug spew
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97912 91177308-0d34-0410-b5e6-96231b3b80d8
commit 18c2cf7e2c0386235e8aff2aa0bcd4c2c287653e
Author: Chris Lattner <sabre@nondot.org>
Date: Sun Mar 7 07:20:49 2010 +0000
more factoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97911 91177308-0d34-0410-b5e6-96231b3b80d8
commit 12d029514ea05bc147939b12219861b94e7ea0e2
Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Sun Mar 7 07:16:49 2010 +0000
_2_ gcc crashes, ah, ah, ah...
(Rolling back r97906.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97909 91177308-0d34-0410-b5e6-96231b3b80d8
commit 67eeb51d145bf66e014961355ca1e552c59e85db
Author: Chris Lattner <sabre@nondot.org>
Date: Sun Mar 7 07:01:28 2010 +0000
teach tblgen to be more aggressive when factoring CheckType nodes.
Now it will factor things like this:
CheckType i32
...
CheckOpcode ISD::AND
CheckType i64
...
into:
SwitchType:
i32: ...
i64:
CheckOpcode ISD::AND
...
This shrinks hte table by a few bytes, nothing spectacular.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97908 91177308-0d34-0410-b5e6-96231b3b80d8
commit 51add9a0af0b77b2a427bf8138cc366aaa6d6c9a
Author: Jeffrey Yasskin <jyasskin@google.com>
Date: Sun Mar 7 06:55:35 2010 +0000
Avoid leaking CompileUnits and DbgScopes from DwarfDebug. Leaks found by Valgrind!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97906 91177308-0d34-0410-b5e6-96231b3b80d8
commit 3e32517a0a32814b4e587e46fe1729f10d14bfba
Author: Chris Lattner <sabre@nondot.org>
Date: Sun Mar 7 06:29:26 2010 +0000
add some helper functions and implement isContradictory
for CheckValueTypeMatcher. The isContradictory implementation
helps us factor better, shrinking x86 table from 79144 -> 78896
bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97905 91177308-0d34-0410-b5e6-96231b3b80d8
commit c08cbfd5b310096f304eeb77ffd28b0e2275dc39
Author: Chris Lattner <sabre@nondot.org>
Date: Sun Mar 7 04:28:09 2010 +0000
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97895 91177308-0d34-0410-b5e6-96231b3b80d8
commit cae2fc5dc584c33fe519252bb2789a115a42ddff
Author: Wesley Peck <peckw@wesleypeck.com>
Date: Sat Mar 6 23:23:12 2010 +0000
Re-committing the failed r97807 commit with changes to eliminate warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97891 91177308-0d34-0410-b5e6-96231b3b80d8
commit 3edbcb547e63556b3c825fb406068af4b3cc3805
Author: Nick Lewycky <nicholas@mxc.ca>
Date: Sat Mar 6 20:26:48 2010 +0000
Add verification of union types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97889 91177308-0d34-0410-b5e6-96231b3b80d8
commit 2fdea181b80dc2509fab0c282b35bb27daea5ab0
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date: Sat Mar 6 20:07:32 2010 +0000
Describe what's going on with mingw alloca and why do we need separate instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97888 91177308-0d34-0410-b5e6-96231b3b80d8
commit 26502318cbe0c14c2bfedbf90165c3699eb8049c
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date: Sat Mar 6 19:39:36 2010 +0000
Initial bits of ARMv4-only support.
Patch by John Tytgat!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97886 91177308-0d34-0410-b5e6-96231b3b80d8
commit 0391c33d30582e640bbae6d394c6718b3226607d
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date: Sat Mar 6 19:32:29 2010 +0000
Lower dynamic stack allocation on mingw32 to separate instruction.
We cannot use a normal call here since it has extra unmodelled side
effects (it changes stack pointer). This should fix PR5292.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97884 91177308-0d34-0410-b5e6-96231b3b80d8
commit 67767d3975c4e4ea349f8e5684a2194456bed849
Author: Chris Lattner <sabre@nondot.org>
Date: Sat Mar 6 19:20:13 2010 +0000
make APFloat::toString be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97883 91177308-0d34-0410-b5e6-96231b3b80d8
commit effd01dcbf1424d4157f7139fd3b4fd34dd1b552
Author: Chris Lattner <sabre@nondot.org>
Date: Sat Mar 6 18:54:37 2010 +0000
disable this for mingw as well, we really need a 'has no dynamic linking' predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97882 91177308-0d34-0410-b5e6-96231b3b80d8