Alexey Samsonov [Sun, 30 Jun 2013 14:47:38 +0000 (14:47 +0000)]
Define the path to llvm-symbolizer tool in a common config to reduce copy-paste
llvm-svn: 185286
Rui Ueyama [Sun, 30 Jun 2013 14:14:44 +0000 (14:14 +0000)]
[PECOFF][Writer] Fix buildbot failure on x86_64-win7.
llvm-svn: 185285
Benjamin Kramer [Sun, 30 Jun 2013 13:47:43 +0000 (13:47 +0000)]
ConstantFold: Check that truncating the other side is safe under a sext when trying to remove a sext from a compare.
Fixes PR16462.
llvm-svn: 185284
Rui Ueyama [Sun, 30 Jun 2013 13:33:36 +0000 (13:33 +0000)]
[PECOFF][Reader] Create a jump table for functions exported by DLL.
llvm-svn: 185283
Richard Smith [Sun, 30 Jun 2013 10:40:20 +0000 (10:40 +0000)]
Teach -Wunsequenced that the side-effects of a function evaluation are sequenced
before the value computation of the result. In C, this is implied by there being
a sequence point after their evaluation, and in C++, it's implied by the
side-effects being sequenced before the expressions and statements in the
function body.
llvm-svn: 185282
Richard Smith [Sun, 30 Jun 2013 09:48:50 +0000 (09:48 +0000)]
Reinstate r185229, reverted in r185256, with a tweak: further ignore the
standard's rule that an extern "C" declaration conflicts with any entity in the
global scope with the same name. Now we only care if the global scope entity is
a variable declaration (and so might have the same mangled name as the extern
"C" declaration). This has been reported as a standard defect.
Original commit message:
PR7927, PR16247: Reimplement handling of matching extern "C" declarations
across scopes.
When we declare an extern "C" name that is not a redeclaration of an entity in
the same scope, check whether it redeclares some extern "C" entity from another
scope, and if not, check whether it conflicts with a (non-extern-"C") entity in
the translation unit.
When we declare a name in the translation unit that is not a redeclaration,
check whether it conflicts with any extern "C" entities (possibly from other
scopes).
llvm-svn: 185281
David Majnemer [Sun, 30 Jun 2013 08:18:16 +0000 (08:18 +0000)]
Lex: Cleanup whitespace in PragmaRegionHandler
llvm-svn: 185280
James Dennett [Sun, 30 Jun 2013 03:13:35 +0000 (03:13 +0000)]
Bug fix: Make RecursiveASTVisitor<T>::TraverseLambdaExpr call
WalkUpFromLambdaExpr, so that the Visit* functions are called
on that AST node.
llvm-svn: 185277
James Dennett [Sun, 30 Jun 2013 03:05:49 +0000 (03:05 +0000)]
Add enumerators to TestVisitor::Language to allow visitor tests to
explicitly specify use of C++98 or C++11. Lang_CXX is preserved as
an alias for Lang_CXX98.
This does not add Lang_CXX1Y or Lang_C11, on the assumption that it's
better to add them if/when they are needed.
(This is a prerequisite for a test in a later patch for RecursiveASTVisitor.)
Reviewed by Richard Smith.
llvm-svn: 185276
Howard Hinnant [Sun, 30 Jun 2013 00:14:43 +0000 (00:14 +0000)]
Matthew Dempsky: POSIX defines that the _POSIX_C_SOURCE macros are to be set by user
code to specify what version of POSIX the system should provide. If
you want to check what version of POSIX is actually available, you're
supposed to test _POSIX_VERSION.
However, since sysconf() has been in POSIX since 1995, it's probably
safe to assume it's available on any system with a C++11 compiler,
especially if _SC_NPROCESSORS_ONLN is defined too. So no point in a
complicated preprocessor rule if just we unconditionally include
<unistd.h> (on non-Windows systems).
Also, I've added a #warning for to help porters detect when a suitable
implementation isn't detected at compile-time.
Howard: Matthew, can you patch CREDITS.TXT? Thanks.
llvm-svn: 185275
Howard Hinnant [Sat, 29 Jun 2013 23:53:20 +0000 (23:53 +0000)]
Matthew Dempsky: Same as stdexcept.cpp in libc++abi: we've already computed 'len strlen(msg)', so we can use memcpy() instead of strcpy().
llvm-svn: 185274
Howard Hinnant [Sat, 29 Jun 2013 23:45:43 +0000 (23:45 +0000)]
Prevent '\b' from backing up into invalid memory. Fixes llvm.org/bugs/show_bug.cgi?id=16240. Sorry, I can not think of a good test case for this one, except by running valgrind as reported in the bug.
llvm-svn: 185273
David Majnemer [Sat, 29 Jun 2013 23:44:53 +0000 (23:44 +0000)]
ValueTracking: Teach isKnownToBeAPowerOfTwo about (ADD X, (XOR X, Y)) where X is a power of two
This allows us to simplify urem instructions involving the add+xor to
turn into simpler math.
llvm-svn: 185272
Benjamin Kramer [Sat, 29 Jun 2013 22:51:12 +0000 (22:51 +0000)]
NVPTX: Fold otherwise unused variable into assert.
Avoids unused variable warnings in release builds.
llvm-svn: 185271
Benjamin Kramer [Sat, 29 Jun 2013 21:17:04 +0000 (21:17 +0000)]
InstCombine: Also turn selects fed by an and into arithmetic when the types don't match.
Inserting a zext or trunc is sufficient. This pattern is somewhat common in
LLVM's pointer mangling code.
llvm-svn: 185270
Benjamin Kramer [Sat, 29 Jun 2013 20:04:19 +0000 (20:04 +0000)]
R600: Unbreak GCC build.
operator++ on an enum is not legal. clang happens to accept it anyways, I think
that's a known bug.
llvm-svn: 185269
Vincent Lejeune [Sat, 29 Jun 2013 19:32:43 +0000 (19:32 +0000)]
R600: Support schedule and packetization of trans-only inst
llvm-svn: 185268
Vincent Lejeune [Sat, 29 Jun 2013 19:32:29 +0000 (19:32 +0000)]
R600: Bank Swizzle now display SCL equivalent
llvm-svn: 185267
Benjamin Kramer [Sat, 29 Jun 2013 18:41:17 +0000 (18:41 +0000)]
misched: Compress pairs returned by getUnderlyingObjectsForInstr.
llvm-svn: 185266
Howard Hinnant [Sat, 29 Jun 2013 18:38:17 +0000 (18:38 +0000)]
Add operators to make launch a bitmask type. Searched all of the standard, and libc++ to see if this error occurred elsewhere and didn't see any other place. This fixes llvm.org/bugs/show_bug.cgi?id=16207
llvm-svn: 185265
Benjamin Kramer [Sat, 29 Jun 2013 17:52:13 +0000 (17:52 +0000)]
Compress pairs. No functionality change.
llvm-svn: 185264
Benjamin Kramer [Sat, 29 Jun 2013 17:52:08 +0000 (17:52 +0000)]
LoopVectorizer: Pack MemAccessInfo pairs.
llvm-svn: 185263
Benjamin Kramer [Sat, 29 Jun 2013 17:02:06 +0000 (17:02 +0000)]
Move helper classes into anonymous namespaces.
llvm-svn: 185262
Benjamin Kramer [Sat, 29 Jun 2013 16:37:14 +0000 (16:37 +0000)]
Driver: Push triple objects around instead of going to std::string all the time.
No functionality change.
llvm-svn: 185261
Hongbin Zheng [Sat, 29 Jun 2013 13:22:15 +0000 (13:22 +0000)]
BlockGenerator: Simplify the old value searching code.
Orignally, we first test if a ValueMap contains a Value, and than use the
index operator to get the corresponding new value. This requires the ValueMap
to lookup the key (i.e. the old value) twice.
Now, we directly use the "lookup" function provided by DenseMap to implement
the same functionality.
llvm-svn: 185260
David Majnemer [Sat, 29 Jun 2013 10:28:04 +0000 (10:28 +0000)]
InstCombine: FoldGEPICmp shouldn't change sign of base pointer comparison
Changing the sign when comparing the base pointer would introduce all
sorts of unexpected things like:
%gep.i = getelementptr inbounds [1 x i8]* %a, i32 0, i32 0
%gep2.i = getelementptr inbounds [1 x i8]* %b, i32 0, i32 0
%cmp.i = icmp ult i8* %gep.i, %gep2.i
%cmp.i1 = icmp ult [1 x i8]* %a, %b
%cmp = icmp ne i1 %cmp.i, %cmp.i1
ret i1 %cmp
into:
%cmp.i = icmp slt [1 x i8]* %a, %b
%cmp.i1 = icmp ult [1 x i8]* %a, %b
%cmp = xor i1 %cmp.i, %cmp.i1
ret i1 %cmp
By preserving the original sign, we now get:
ret i1 false
This fixes PR16483.
llvm-svn: 185259
David Majnemer [Sat, 29 Jun 2013 09:45:35 +0000 (09:45 +0000)]
InstCombine: Small whitespace cleanup in FoldGEPICmp
llvm-svn: 185258
David Majnemer [Sat, 29 Jun 2013 08:40:07 +0000 (08:40 +0000)]
InstCombine: Be more agressive optimizing 'udiv' instrs with 'select' denoms
Real world code sometimes has the denominator of a 'udiv' be a
'select'. LLVM can handle such cases but only when the 'select'
operands are symmetric in structure (both select operands are a constant
power of two or a left shift, etc.). This falls apart if we are dealt a
'udiv' where the code is not symetric or if the select operands lead us
to more select instructions.
Instead, we should treat the LHS and each select operand as a distinct
divide operation and try to optimize them independently. If we can
to simplify each operation, then we can replace the 'udiv' with, say, a
'lshr' that has a new select with a bunch of new operands for the
select.
llvm-svn: 185257
Timur Iskhodzhanov [Sat, 29 Jun 2013 08:38:42 +0000 (08:38 +0000)]
Revert r185229 as it breaks compilation of <windows.h>
llvm-svn: 185256
Hongbin Zheng [Sat, 29 Jun 2013 07:21:57 +0000 (07:21 +0000)]
Add the git attributes file.
The attribute in the file allows git to perform End-of-Line
normalization (CRLF to LF).
llvm-svn: 185255
Hongbin Zheng [Sat, 29 Jun 2013 07:00:14 +0000 (07:00 +0000)]
TempScop: (Partial) Implement the printDetail function.
llvm-svn: 185254
Hongbin Zheng [Sat, 29 Jun 2013 06:31:39 +0000 (06:31 +0000)]
Refactor memory access getting code in ScopStmt.
1. Do not allow creating new memory access record in the InstructionToAccess map
on the fly in function getAccessFor.
2. Do not allow user to modify the memory accesses returned by getAccessFor
during the code generation process.
llvm-svn: 185253
Hongbin Zheng [Sat, 29 Jun 2013 06:30:55 +0000 (06:30 +0000)]
Minor change: No need to specify the namespace of raw_ostream.
llvm-svn: 185252
Nadav Rotem [Sat, 29 Jun 2013 05:38:15 +0000 (05:38 +0000)]
We preserve the CFG and some of the analysis passes.
llvm-svn: 185251
Nadav Rotem [Sat, 29 Jun 2013 05:37:19 +0000 (05:37 +0000)]
Update docs.
llvm-svn: 185250
Manman Ren [Sat, 29 Jun 2013 05:01:19 +0000 (05:01 +0000)]
Debug Info: clean up usage of Verify.
No functionality change.
It should suffice to check the type of a debug info metadata, instead of
calling Verify. For cases where we know the type of a DI metadata, use
assert.
llvm-svn: 185249
Rui Ueyama [Sat, 29 Jun 2013 04:28:51 +0000 (04:28 +0000)]
Move a function into assert() so that GCC won't complain that the
function is not used in release build.
llvm-svn: 185248
Rui Ueyama [Sat, 29 Jun 2013 04:28:44 +0000 (04:28 +0000)]
Remove extra ';'
llvm-svn: 185247
Enrico Granata [Sat, 29 Jun 2013 01:53:55 +0000 (01:53 +0000)]
More useful printout of arguments after the recent changes to support LLDB_TEST_ARGUMENTS
llvm-svn: 185246
Greg Clayton [Sat, 29 Jun 2013 00:10:32 +0000 (00:10 +0000)]
Fixed SBProcess::RemoteLaunch() to use the platform executable path. Patch from Sebastien Metrot.
llvm-svn: 185245
Argyrios Kyrtzidis [Fri, 28 Jun 2013 23:47:22 +0000 (23:47 +0000)]
[test] Add test case for rdar://
14183893.
llvm-svn: 185244
Richard Trieu [Fri, 28 Jun 2013 23:46:19 +0000 (23:46 +0000)]
Change assert(0 && "text") to llvm_unreachable(0 && "text")
llvm-svn: 185243
David Majnemer [Fri, 28 Jun 2013 23:42:03 +0000 (23:42 +0000)]
InstCombine: Optimize (1 << X) Pred CstP2 to X Pred Log2(CstP2)
We may, after other optimizations, find ourselves with IR that looks
like:
%shl = shl i32 1, %y
%cmp = icmp ult i32 %shl, 32
Instead, we should just compare the shift count:
%cmp = icmp ult i32 %y, 5
llvm-svn: 185242
Preston Briggs [Fri, 28 Jun 2013 23:34:23 +0000 (23:34 +0000)]
extending the interface of Dependence slightly to support future work
llvm-svn: 185241
Enrico Granata [Fri, 28 Jun 2013 23:33:18 +0000 (23:33 +0000)]
<rdar://problem/
14309010>
OS Plugins' __init__ method takes two arguments: (self,process)
I was erroneously passing the session_dict as well as part of my PyCallable changes and that caused plugins to fail to work
llvm-svn: 185240
Matt Arsenault [Fri, 28 Jun 2013 23:24:10 +0000 (23:24 +0000)]
Fix copypaste error in test.
Thename says it's an i32*, but it was actually creating another i8*
llvm-svn: 185239
Matt Arsenault [Fri, 28 Jun 2013 23:24:05 +0000 (23:24 +0000)]
Fix extra whitespace / formatting
llvm-svn: 185238
Jakob Stoklund Olesen [Fri, 28 Jun 2013 22:54:16 +0000 (22:54 +0000)]
Try to unbreak Linux buildbots.
llvm-svn: 185237
Jakob Stoklund Olesen [Fri, 28 Jun 2013 22:40:43 +0000 (22:40 +0000)]
Minimize precision loss when computing cyclic probabilities.
Allow block frequencies to exceed 32 bits by using the new
BlockFrequency division function.
llvm-svn: 185236
Hal Finkel [Fri, 28 Jun 2013 22:29:56 +0000 (22:29 +0000)]
PPC: Ignore spill/restore requests for VRSAVE (except on Darwin)
This fixes PR16418, which reports that a function calling
__builtin_unwind_init() asserts. The cause is that this generates a
spill/restore for VRSAVE, and we support that only on Darwin (because VRSAVE is
only really used on Darwin).
The test case checks only that we don't crash. We can add correctness checks
once someone verifies what behavior the function is supposed to have.
llvm-svn: 185235
Richard Smith [Fri, 28 Jun 2013 22:28:37 +0000 (22:28 +0000)]
Fix typo found by Clang fix for extern "C" function handling.
llvm-svn: 185234
Jim Ingham [Fri, 28 Jun 2013 22:21:22 +0000 (22:21 +0000)]
Missed a place where we have to pass the source location twice to FunctionDecl::Create.
llvm-svn: 185233
Daniel Malea [Fri, 28 Jun 2013 22:17:57 +0000 (22:17 +0000)]
Replace UNIXy path with os-independent one in DebugIR unit test
- should resolve windows buildbot failure
llvm-svn: 185232
Eli Friedman [Fri, 28 Jun 2013 22:13:27 +0000 (22:13 +0000)]
Remove dead code.
llvm-svn: 185231
Nadav Rotem [Fri, 28 Jun 2013 22:07:09 +0000 (22:07 +0000)]
SLP Vectorizer: Add support for trees with external users.
To support this we have to insert 'extractelement' instructions to pick the right lane.
We had this functionality before but I removed it when we moved to the multi-block design because it was too complicated.
llvm-svn: 185230
Richard Smith [Fri, 28 Jun 2013 22:03:51 +0000 (22:03 +0000)]
PR7927, PR16247: Reimplement handling of matching extern "C" declarations
across scopes.
When we declare an extern "C" name that is not a redeclaration of an entity in
the same scope, check whether it redeclares some extern "C" entity from another
scope, and if not, check whether it conflicts with a (non-extern-"C") entity in
the translation unit.
When we declare a name in the translation unit that is not a redeclaration,
check whether it conflicts with any extern "C" entities (possibly from other
scopes).
llvm-svn: 185229
Richard Trieu [Fri, 28 Jun 2013 21:54:25 +0000 (21:54 +0000)]
Fix broken asserts that never fire.
Change assert("text") to assert(0 && "text"). The first case is a const char *
to bool conversion, which always evaluates to true, never triggering the
assert. The second case will always trigger the assert.
llvm-svn: 185227
Jakob Stoklund Olesen [Fri, 28 Jun 2013 21:51:18 +0000 (21:51 +0000)]
Fix a bad overflow check pointed out by Ben.
llvm-svn: 185226
Daniel Malea [Fri, 28 Jun 2013 21:49:53 +0000 (21:49 +0000)]
Fix Windows/Darwin build error in DebugIR unit tests
- mistakenly used get_current_dir() linux function
- replaced with getcwd/_getcwd as appropriate for current platform
llvm-svn: 185225
Sean Callanan [Fri, 28 Jun 2013 21:44:15 +0000 (21:44 +0000)]
Hitherto the IRForTarget infrastructure has mainly
been suitable for preparing a single IR function
for operation in the target. However, using blocks
and lambdas creates other IR functions that also
need to be processed.
I have audited IRForTarget to make it process
multiple functions. Where IRForTarget would add
new instructions at the beginning of the main
expression function, it now adds them on-demand
in the function where they are needed. This is
enabled by a system of FunctionValueCaches, which
invoke a lambda to create or derive the values as
needed, or report the result of that lambda if it
has already been called for the given function.
<rdar://problem/
14180236>
llvm-svn: 185224
Howard Hinnant [Fri, 28 Jun 2013 21:40:28 +0000 (21:40 +0000)]
Make cout a little more thread-safe. This fixes llvm.org/bugs/show_bug.cgi?id=12158
llvm-svn: 185222
Andrew Kaylor [Fri, 28 Jun 2013 21:40:16 +0000 (21:40 +0000)]
Revising the MCJIT ObjectCache interface to allow subclasses to avoid retaining references to returned objects
llvm-svn: 185221
David Blaikie [Fri, 28 Jun 2013 21:28:01 +0000 (21:28 +0000)]
Remove unused member
llvm-svn: 185219
Jakob Stoklund Olesen [Fri, 28 Jun 2013 21:10:25 +0000 (21:10 +0000)]
Eliminate an assortment of undefined behavior.
Hopefully, this fixes the PPC64 buildbots.
llvm-svn: 185218
Greg Clayton [Fri, 28 Jun 2013 21:08:47 +0000 (21:08 +0000)]
Default parameters are evil and should not be used. Case and point this checkin that fixes implicit conversions that were happening.
llvm-svn: 185217
Eli Friedman [Fri, 28 Jun 2013 21:07:41 +0000 (21:07 +0000)]
Fix error recovery with in-class initializer.
Previously, for a field with an invalid in-class initializer, we
would create a CXXDefaultInitExpr referring to a null Expr*.
This is not a good idea.
llvm-svn: 185216
Eli Friedman [Fri, 28 Jun 2013 20:48:34 +0000 (20:48 +0000)]
Fix line endings.
llvm-svn: 185215
Nadav Rotem [Fri, 28 Jun 2013 20:46:27 +0000 (20:46 +0000)]
LoopVectorizer: Refactor the code that checks if it is safe to predicate blocks.
In this code we keep track of pointers that we are allowed to read from, if they are accessed by non-predicated blocks.
We use this list to allow vectorization of conditional loads in predicated blocks because we know that these addresses don't segfault.
llvm-svn: 185214
Peter Collingbourne [Fri, 28 Jun 2013 20:45:28 +0000 (20:45 +0000)]
[ms-cxxabi] Move CodeGenVTables::needsVTTParameter to ItaniumCXXABI.
This function only makes sense there. Eventually it should no longer
be part of the CGCXXABI interface, as it is an Itanium-specific detail.
Differential Revision: http://llvm-reviews.chandlerc.com/D821
llvm-svn: 185213
Daniel Malea [Fri, 28 Jun 2013 20:37:20 +0000 (20:37 +0000)]
Adding tests for DebugIR pass
- lit tests verify that each line of input LLVM IR gets a !dbg node and a
corresponding entry of metadata that contains the line number
- unit tests verify that DebugIR works as advertised in the interface
- refactored some useful IR generation functionality from the MCJIT unit tests
so it can be reused
llvm-svn: 185212
Howard Hinnant [Fri, 28 Jun 2013 20:31:05 +0000 (20:31 +0000)]
Provide missing '{' in parsing extended quoted characters. This fixes llvm.org/bugs/show_bug.cgi?id=16135
llvm-svn: 185211
Greg Clayton [Fri, 28 Jun 2013 20:26:06 +0000 (20:26 +0000)]
FileSpec destructor doesn't need to be virtual.
llvm-svn: 185210
Tom Stellard [Fri, 28 Jun 2013 20:23:29 +0000 (20:23 +0000)]
R600/SI: Add processor types for each CIK variant
Patch By: Alex Deucher
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
llvm-svn: 185209
Greg Clayton [Fri, 28 Jun 2013 20:20:28 +0000 (20:20 +0000)]
ArchSpec doesn't need a virtual destructor.
llvm-svn: 185208
Greg Clayton [Fri, 28 Jun 2013 20:19:27 +0000 (20:19 +0000)]
PathMappingList doesn't need a virtual destructor.
llvm-svn: 185207
Hal Finkel [Fri, 28 Jun 2013 20:18:14 +0000 (20:18 +0000)]
Fix CodeGen/PowerPC/stack-protector.ll on OpenBSD
On OpenBSD, the stack-smash protection transform uses "__guard_local"
and "__stack_smash_handler" instead of "__stack_chk_guard" and
"__stack_chk_fail". However, CodeGen/PowerPC/stack-protector.ll
doesn't specify a target OS, so on OpenBSD it fails.
Add -mtriple=ppc32-unknown-linux to make the test host-OS agnostic. While
there, convert to FileCheck.
Patch by Matthew Dempsky.
llvm-svn: 185206
Rui Ueyama [Fri, 28 Jun 2013 20:10:36 +0000 (20:10 +0000)]
[PECOFF][Writer] Fix wrong section header.
llvm-svn: 185205
David Blaikie [Fri, 28 Jun 2013 20:05:11 +0000 (20:05 +0000)]
DebugInfo: PR14728: TLS support
Based on GCC's output for TLS variables (OP_constNu, x@dtpoff,
OP_lo_user), this implements debug info support for TLS in ELF. Verified
that this output is correct/sufficient on Linux (using gold - if you're
using binutils-ld, you'll need something with the fix for
http://sourceware.org/bugzilla/show_bug.cgi?id=15685 in it).
Support on non-ELF is sort of "arbitrary" at the moment - if Apple folks
want to discuss (or just go ahead & implement) how this should work in
MachO, etc, I'm open.
llvm-svn: 185203
David Blaikie [Fri, 28 Jun 2013 20:05:04 +0000 (20:05 +0000)]
DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbols
This is a precursor to adding debug info support for TLS which requires
non-default relocations applied to TLS symbols.
llvm-svn: 185202
Hal Finkel [Fri, 28 Jun 2013 20:00:07 +0000 (20:00 +0000)]
Fix a PPC rlwimi instruction-selection bug
Under certain (evidently rare) circumstances, this code used to convert OR(a,
AND(x, y)) into OR(a, x). This was incorrect.
While there, I've added a comment to the code immediately above.
llvm-svn: 185201
Rui Ueyama [Fri, 28 Jun 2013 19:59:54 +0000 (19:59 +0000)]
[PECOFF][Writer] Remove duplicated code by moving it to parent class.
llvm-svn: 185200
Anton Yartsev [Fri, 28 Jun 2013 19:21:11 +0000 (19:21 +0000)]
+ "For Windows Users" section
+ description for --use-analyzer option
+ managed size of columns of the 'options' table
llvm-svn: 185199
Daniel Malea [Fri, 28 Jun 2013 19:19:44 +0000 (19:19 +0000)]
Remove needless include (unistd.h) in DebugIR pass
- should unbreak Windows builds
llvm-svn: 185198
Daniel Malea [Fri, 28 Jun 2013 19:11:40 +0000 (19:11 +0000)]
Add flag to lli to enable debugging of IR when used with MCJIT.
- warn users when -debug-ir is used with old JIT engine (only partial debug
info is available)
For example, to debug an IR file with GDB (that supports JIT registration), do:
$ gdb --args lli -use-mcjit -debug-ir testcase.ll
(gdb) break main
(gdb) run
<Process continues to lli main>
(gdb) continue
<Process continues to testcase.ll main()
(gdb) step
<Now stepping through the LLVM IR in testcase.ll>
llvm-svn: 185197
Howard Hinnant [Fri, 28 Jun 2013 19:11:23 +0000 (19:11 +0000)]
William Fisher: A bug in __lookahead::exec causes /(?=^)b/ to match ab. When makes a recursive call to , it passes true for the value of . This causes a beginning-of-line anchor (^) inside a lookahead assertion to match anywhere in the text. This fixes llvm.org/bugs/show_bug.cgi?id=11118
llvm-svn: 185196
Rui Ueyama [Fri, 28 Jun 2013 19:08:57 +0000 (19:08 +0000)]
[PECOFF][Writer] Define COFFBaseDefinedAtom as the base class of COFF defined atoms.
In order to support linking against DLL, the linker needs to create defined
atoms for jump tables and etc. Because such atoms are not read from a file,
they lack some information such as an ordinal. With this patch, COFFDefinedAtom
is split into two classes; one is the base class of all COFF defined atoms, and
another is a concrete class for atoms read from file. More classes inheriting
COFFBaseDefinedAtom will be added for jump tables and etc.
llvm-svn: 185195
Daniel Malea [Fri, 28 Jun 2013 19:07:59 +0000 (19:07 +0000)]
Add missing header for DebugIR
- missed svn add...
llvm-svn: 185194
Daniel Malea [Fri, 28 Jun 2013 19:05:23 +0000 (19:05 +0000)]
Remove limitation on DebugIR that made it require existing debug metadata.
- Build debug metadata for 'bare' Modules using DIBuilder
- DebugIR can be constructed to generate an IR file (to be seen by a debugger)
or not in cases where the user already has an IR file on disk.
llvm-svn: 185193
Howard Hinnant [Fri, 28 Jun 2013 18:57:30 +0000 (18:57 +0000)]
Bill Fisher: Fix for failing to throw an exception in regex when parsing an invalid escape sequence. This fixes llvm.org/bugs/show_bug.cgi?id=16023
llvm-svn: 185192
Chad Rosier [Fri, 28 Jun 2013 18:57:01 +0000 (18:57 +0000)]
Fix an off-by-one error. Also make the code a little more explicit in what it
is trying to do.
llvm-svn: 185191
David Blaikie [Fri, 28 Jun 2013 18:55:13 +0000 (18:55 +0000)]
DebugInfo: Revise r185189 to avoid subtle 'unsigned += bool'
llvm-svn: 185190
David Blaikie [Fri, 28 Jun 2013 18:47:19 +0000 (18:47 +0000)]
DebugInfo: Simplify the AddressPool representation
llvm-svn: 185189
David Blaikie [Fri, 28 Jun 2013 18:47:14 +0000 (18:47 +0000)]
DebugInfo: constify the AddressPool MCSymbol pointers
llvm-svn: 185188
Preston Briggs [Fri, 28 Jun 2013 18:44:48 +0000 (18:44 +0000)]
(no commit message)
llvm-svn: 185187
Lang Hames [Fri, 28 Jun 2013 18:36:42 +0000 (18:36 +0000)]
Add missing case to switch statement - DAGTypeLegalizer::ExpandIntegerResult
should expand ATOMIC_CMP_SWAP nodes the same way that it does for ATOMIC_SWAP.
Since ATOMIC_LOADs on some targets (e.g. older ARM variants) get legalized to
ATOMIC_CMP_SWAPs, the missing case had been causing i64 atomic loads to crash
during isel.
<rdar://problem/
14074644>
llvm-svn: 185186
Jakob Stoklund Olesen [Fri, 28 Jun 2013 18:33:19 +0000 (18:33 +0000)]
Stylistic cleanups, no functional change.
- Use static functions instead of anonymous namespace.
- Appease the Doxygen lobby.
- Use 0-based induction variable.
llvm-svn: 185185
Jakob Stoklund Olesen [Fri, 28 Jun 2013 18:23:42 +0000 (18:23 +0000)]
Add a division operator to BlockFrequency.
Allow a BlockFrequency to be divided by a non-zero BranchProbability
with saturating arithmetic. This will be used to compute the frequency
of a loop header given the probability of leaving the loop.
Our long division algorithm already saturates on overflow, so that was a
freebie.
llvm-svn: 185184
Howard Hinnant [Fri, 28 Jun 2013 18:09:35 +0000 (18:09 +0000)]
Dimitry Andric: Add const to constexpr member functions in order to cope with new C++1y language rules. This silences -Wconstexpr-not-const warnings.
llvm-svn: 185181
Eric Christopher [Fri, 28 Jun 2013 18:03:54 +0000 (18:03 +0000)]
Remove unused variables.
llvm-svn: 185180
Justin Holewinski [Fri, 28 Jun 2013 17:58:15 +0000 (17:58 +0000)]
[NVPTX] Select -1 instead of 1 when anyextend'ing i1 types
This makes it more consistent with the ZeroOrNegativeOneBooleanContent flag
llvm-svn: 185179