Commit Graph

119611 Commits

Author SHA1 Message Date
Sebastian Pop 3f2f65f1f8 add polly.sh script
llvm-svn: 147543
2012-01-04 20:11:18 +00:00
Sebastian Pop 0f357d6c22 use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJIT
Get back getHostTriple.

For JIT compilation, use the host triple instead of the default
target: this fixes some JIT testcases that used to fail when the
compiler has been configured as a cross compiler.

llvm-svn: 147542
2012-01-04 19:47:22 +00:00
Akira Hatanaka aac3e06bf7 Enable -soft-float for MIPS.
llvm-svn: 147541
2012-01-04 19:29:11 +00:00
Sean Callanan a4c6ad1914 Fixed the help text for raw commands like "expr"
to include -- in sample command lines.  Now LLDB
prints

  expression [-f <format>] -- <expr>

instead of

  expression [-f <format>] <expr>

and also adds a new example line:

  expression <expr>

to show that in the absense of arguments the --
can be ommitted.

llvm-svn: 147540
2012-01-04 19:11:25 +00:00
Sean Callanan 06d3d01295 Instead of blindly printing a string when
eFormatCString is specified, I have made
DataExtractor::Dump properly escape the string.
This prevents LLDB from printing characters
that confuse terminals.

llvm-svn: 147536
2012-01-04 17:36:30 +00:00
Douglas Gregor b8c6f1e950 Implement declaration merging for variables in disjoint modules.
llvm-svn: 147535
2012-01-04 17:21:36 +00:00
Douglas Gregor b258569405 Implement declaration merging for non-template functions from
different modules. This implementation is a first approximation of
what we want, using only the function type to determine
equivalence. Later, we'll want to deal with some of the more subtle
issues, including:

  - C allows a prototyped declaration and a non-prototyped declaration
    to be merged, which we should support
  - We may want to ignore the return type when merging, then
    complain if the return types differ. Or, we may want to leave it
    as it us, so that we only complain if overload resolution
    eventually fails.
  - C++ non-static member functions need to consider cv-qualifiers
    and ref-qualifiers.
  - Function templates need to consider the template parameters and
    return type.
  - Function template specializations will have special rules.
  - We can now (accidentally!) end up overloading in C, even without
    the "overloadable" attribute, and will need to detect this at some
    point.
  
The actual detection of "is this an overload?" is implemented by
Sema::IsOverload(), which will need to be moved into the AST library
for re-use here. That will be a future refactor.

llvm-svn: 147534
2012-01-04 17:13:46 +00:00
Douglas Gregor 9b7b39116e Implement declaration merging for typedefs loaded from disjoint
modules, so long as the typedefs refer to the same underlying
type. This ensures that the typedefs end up in the same redeclaration
chain.

To test this, fix name lookup for C/Objective-C to properly deal with
multiple declarations with the same name in the same scope.

llvm-svn: 147533
2012-01-04 16:44:10 +00:00
Marshall Clow f368486f4c Better comment
llvm-svn: 147532
2012-01-04 14:56:09 +00:00
Benjamin Kramer 6dced3b468 Penryn doesn't support sse4.2, don't enable it in the first place.
While the code took care of disabling the sse42 flag it didn't know
about popcnt. This broke -march=native on penryn.

llvm-svn: 147531
2012-01-04 14:36:57 +00:00
David Chisnall 207a630052 Restore r147493 and remove the part of the test that was checking the wrong thing.
llvm-svn: 147530
2012-01-04 12:02:13 +00:00
Nick Lewycky 6d1d4bb6a1 Remove pointless asserts.
llvm-svn: 147529
2012-01-04 09:42:30 +00:00
Nick Lewycky 0c48afa0ed Teach instcombine all sorts of great stuff about shifts that have exact, nuw or
nsw bits on them.

llvm-svn: 147528
2012-01-04 09:28:29 +00:00
Craig Topper f726e15f44 Allow vector shuffle normalizing to use concat vector even if the sources are commuted in the shuffle mask.
llvm-svn: 147527
2012-01-04 09:23:09 +00:00
Ted Kremenek 5799cddde0 Extend ConditionBRVisitor to handle condition variable assignments.
llvm-svn: 147526
2012-01-04 08:18:09 +00:00
Craig Topper 279c77b677 Implement VECTOR_SHUFFLE canonicalizations during DAG combine.
llvm-svn: 147525
2012-01-04 08:07:43 +00:00
Douglas Gregor 8d76cca3a2 Don't treat 'import' as a contextual keyword when we're in a caching lexer, or when modules are disabled.
llvm-svn: 147524
2012-01-04 06:20:15 +00:00
Rafael Espindola 2aa7acfadb Process attributes in explicit function template instantiations. Fixes part of
PR11690.

llvm-svn: 147523
2012-01-04 05:40:59 +00:00
Eli Friedman 36d129435e Add an explicit LambdaExprContext to Declarator, to parallel BlockLiteralContext. Use it to ensure semantic analysis of types isn't confused by the lack of a type specifier.
llvm-svn: 147522
2012-01-04 04:41:38 +00:00
NAKAMURA Takumi 91a3f886ef test/CodeGen/X86/jump_sign.ll: Add -mcpu=pentiumpro for non-x86 hosts. It uses "cmov".
llvm-svn: 147521
2012-01-04 03:52:23 +00:00
Akira Hatanaka f093f5be3e Have functions return structures smaller than 128-bit in registers if ABI
is either N32 or N64. 

llvm-svn: 147520
2012-01-04 03:34:42 +00:00
Akira Hatanaka 3b775b8cc3 Rename immLUiOpnd.
llvm-svn: 147519
2012-01-04 03:09:26 +00:00
Akira Hatanaka b89a4bfe41 - Define base classes for Jump-and-link instructions and make 32-bit and 64-bit
versions derive from them.
- JALR64 is not needed since N64 does not emit jal. 
- Add template parameter to BranchLink that sets the rt field. 
- Fix the set of temporary registers for O32 and N64.

llvm-svn: 147518
2012-01-04 03:02:47 +00:00
Eli Friedman 898caf8f26 Fix messed-up indentation in r147515.
llvm-svn: 147517
2012-01-04 02:46:53 +00:00
Akira Hatanaka c669d7a6db Have getRegForInlineAsmConstraint return the correct register class when target
is Mips64.

llvm-svn: 147516
2012-01-04 02:45:01 +00:00
Eli Friedman c7c97144af Stub out the Sema interface for lambda expressions, and change the parser to use it. Unconditionally error on lambda expressions because they don't work in any meaningful way yet.
llvm-svn: 147515
2012-01-04 02:40:39 +00:00
Kostya Serebryany cc1d7893d6 [asan] remove objdump-based tests in favour of much simpler LLVM-ish tests
llvm-svn: 147514
2012-01-04 02:08:46 +00:00
Evan Cheng 801d98b3f0 Fix more places which should be checking for iOS, not darwin.
llvm-svn: 147513
2012-01-04 01:55:04 +00:00
Evan Cheng 104dbb0fd1 For x86, canonicalize max
(x > y) ? x : y
=>
(x >= y) ? x : y

So for something like
(x - y) > 0 : (x - y) ? 0
It will be
(x - y) >= 0 : (x - y) ? 0

This makes is possible to test sign-bit and eliminate a comparison against
zero. e.g.
subl   %esi, %edi
testl  %edi, %edi
movl   $0, %eax
cmovgl %edi, %eax
=>
xorl   %eax, %eax
subl   %esi, $edi
cmovsl %eax, %edi

rdar://10633221

llvm-svn: 147512
2012-01-04 01:41:39 +00:00
Rafael Espindola f90b6d1580 Revert r147493. It broke test/CodeGenObjC/constant-strings.m.
llvm-svn: 147511
2012-01-04 01:32:19 +00:00
Kostya Serebryany 842ae27ae3 [asan] one more test for asan instrumentation: (*a)++ should be instrumented only once.
llvm-svn: 147509
2012-01-04 01:02:14 +00:00
Ted Kremenek 990464cb30 Teach the static analyzer to not treat XPC types as CF types.
llvm-svn: 147506
2012-01-04 00:35:48 +00:00
Ted Kremenek e8300e5eba Minor code formatting cleanups.
llvm-svn: 147505
2012-01-04 00:35:45 +00:00
Fariborz Jahanian 1fc1c6c307 In non-gc, non-arc mode, property of 'Class' type
variety is treated as a 'void *'. No need to issue
warning reserved for objc object properties.
// rdar://10565506

llvm-svn: 147504
2012-01-04 00:31:53 +00:00
Eli Friedman 90dc17510b Get rid of an unnecessary check; the AST for init-lists is the same independent of whether we're in C++11 mode.
llvm-svn: 147503
2012-01-03 23:54:05 +00:00
Chris Lattner 6b77a07f75 Turn a few more inline asm errors into "emitErrors" instead of fatal errors.
Before we'd get:

$ clang t.c 
fatal error: error in backend: Invalid operand for inline asm constraint 'i'!

Now we get:

$ clang t.c
t.c:16:5: error: invalid operand for inline asm constraint 'i'!
    "movq         (%4), %%mm0\n"
    ^

Which at least gets us the inline asm that is the problem.

llvm-svn: 147502
2012-01-03 23:51:01 +00:00
Chris Lattner e22e613128 generalize LLVMContext::emitError to take a twine instead of a StringRef.
llvm-svn: 147501
2012-01-03 23:47:05 +00:00
Ted Kremenek 134a83a799 Enhance UnixAPIChecker to also warn about zero-sized allocations to calloc() and realloc(). Patch by Cyril Roelandt!
llvm-svn: 147500
2012-01-03 23:43:13 +00:00
Douglas Gregor 6aeecf1791 Minor tweak to name lookup for C/Objective-C: after the first name, still consider whether this is a redeclaration lookup when determining whether to look for the visible declaration
llvm-svn: 147499
2012-01-03 23:34:23 +00:00
Douglas Gregor b59643baf6 Test "merging" of typedef types across distinct modules. At present,
the AST reader doesn't actually perform a merge, because name lookup
knows how to merge identical typedefs together.

As part of this, teach C/Objective-C name lookup to return multiple
results in all cases, rather than first digging through the attributes
to see if the value is overloadable. This way, we'll catch ambiguous
lookups in C/Objective-C.

llvm-svn: 147498
2012-01-03 23:26:26 +00:00
Marshall Clow f83663a9cd Don't allocate TLS storage when checking to see if an exception has been thrown - really
llvm-svn: 147497
2012-01-03 23:26:09 +00:00
Eli Friedman b9c7129012 Support constant evaluation for OpenCL nested vector literals. Patch by Anton Lokhmotov.
llvm-svn: 147496
2012-01-03 23:24:20 +00:00
Chad Rosier 6ca97df951 Fix 80-column violations.
llvm-svn: 147495
2012-01-03 23:19:12 +00:00
Ted Kremenek b3512d3a48 Add initial version of checker to check if virtual member functions are called transitively
from C++ constructors or destructors.  Checker by Lei Zhang with a few tweaks by Ted Kremenek.

llvm-svn: 147494
2012-01-03 23:18:57 +00:00
David Chisnall 31640e1606 Initialise constant Objective-C string isa pointers with a weak reference to the class, so that they are usable in +load methods if the string class has been compiled with clang - if it's been compiled with GCC, the ABI makes this impossible. (GNU runtimes)
llvm-svn: 147493
2012-01-03 23:18:17 +00:00
Marshall Clow 3e417e7a5c Don't allocate TLS storage when checking to see if an exception has been thrown
llvm-svn: 147492
2012-01-03 23:10:20 +00:00
Jakob Stoklund Olesen bd75a417f9 Don't use enums larger than 1 << 31 for target features.
Patch by Andy Zhang!

llvm-svn: 147491
2012-01-03 23:04:28 +00:00
Fariborz Jahanian 7249e36704 objc: diagnose misplacement of objc_suppress_autosynthesis
attribute.

llvm-svn: 147490
2012-01-03 22:52:32 +00:00
Chad Rosier 1ad2433690 Fixed by Chandler in r147434.
llvm-svn: 147489
2012-01-03 22:51:32 +00:00
Douglas Gregor 2009ceed82 Implement cross-module declaration merging for tag declarations, so
that if two modules A and B both contain a declaration of a tag such
as

  struct X;

and those two modules are unrelated, the two declarations of X will be
merged into a single redeclaration chain.

llvm-svn: 147488
2012-01-03 22:46:00 +00:00