Commit Graph

124813 Commits

Author SHA1 Message Date
Kostya Serebryany d18cb502bd use EP_OptimizerLast instead of EP_ScalarOptimizerLate for ThreadSanitizer
llvm-svn: 153356
2012-03-23 23:25:23 +00:00
Argyrios Kyrtzidis 822c433a27 Make sure we don't accept an @interface inside another objc container
just because there was an attribute in front of it.

llvm-svn: 153355
2012-03-23 23:24:23 +00:00
Argyrios Kyrtzidis aaf9743f56 [libclang] Make sure we don't crash when trying to index code that
managed to insert an @interface as top level decl contained by another
@interface.

A commit to also not allow this as valid code will be coming.

rdar://11105114.

llvm-svn: 153354
2012-03-23 23:24:18 +00:00
Kostya Serebryany e505a5abe9 add EP_OptimizerLast extension point
llvm-svn: 153353
2012-03-23 23:22:59 +00:00
Bill Wendling 8737480dfa It's possible for two types, which are isomorphic, to be added to the
destination module, but one of them isn't used in the destination module. If
another module comes along and the uses the unused type, there could be type
conflicts when the modules are finally linked together. (This happened when
building LLVM.)

The test that was reduced is:

Module A:

%Z = type { %A }
%A = type { %B.1, [7 x x86_fp80] }
%B.1 = type { %C }
%C = type { i8* }

declare void @func_x(%C*, i64, i64)
declare void @func_z(%Z* nocapture)

Module B:

%B = type { %C.1 }
%C.1 = type { i8* }
%A.2 = type { %B.3, [5 x x86_fp80] }
%B.3 = type { %C.1 }

define void @func_z() {
  %x = alloca %A.2, align 16
  %y = getelementptr inbounds %A.2* %x, i64 0, i32 0, i32 0
  call void @func_x(%C.1* %y, i64 37, i64 927) nounwind
  ret void
}

declare void @func_x(%C.1*, i64, i64)
declare void @func_y(%B* nocapture)

(Unfortunately, this test doesn't fail under llvm-link, only during an LTO
linking.) The '%C' and '%C.1' clash. The destination module gets the '%C'
declaration. When merging Module B, it looks at the '%C.1' subtype of the '%B'
structure. It adds that in, because that's cool. And when '%B.3' is processed,
it uses the '%C.1'. But the '%B' has used '%C' and we prefer to use '%C'. So the
'@func_x' type is changed to 'void (%C*, i64, i64)', but the type of '%x' in
'@func_z' remains '%A.2'. The GEP resolves to a '%C.1', which conflicts with the
'@func_x' signature.

We can resolve this situation by making sure that the type is used in the
destination before saying that it should be used in the module being merged in.

With this fix, LLVM and Clang both compile under LTO.
<rdar://problem/10913281>

llvm-svn: 153351
2012-03-23 23:17:38 +00:00
Richard Smith 34bd1eb560 Revert accidentally-committed www changes (and an unused diagnostic);
forward-declared enums aren't /quite/ done yet.

llvm-svn: 153350
2012-03-23 23:11:49 +00:00
Richard Smith b66d77793f When defining a forward-declared enum, don't try to attach the definition to
a previous declaration if the redeclaration is invalid. That way lies madness.
Fixes a crash-on-invalid reported by Abramo.

llvm-svn: 153349
2012-03-23 23:09:08 +00:00
Akira Hatanaka 6976ec8551 Add support for MIPS' floating ABIs (hard, soft and single) to clang driver.
Patch by Simon Atanasyan.

llvm-svn: 153348
2012-03-23 23:07:09 +00:00
Jim Grosbach 190e7b6e18 ARM tidy up ARMConstantIsland.cpp.
No functional change, just tidy up the code and nomenclature a bit.

llvm-svn: 153347
2012-03-23 23:07:03 +00:00
Jim Grosbach 4a2909ab0f Pretty-printing comments for literal floating point in .s files.
Dump the hex representation to the comment stream as well as the float
value.

llvm-svn: 153346
2012-03-23 23:06:47 +00:00
Akira Hatanaka 64ad2cf1e4 Add a hook in MCELFObjectTargetWriter to allow targets to sort relocation
entries in the relocation table before they are written out to the file. 

llvm-svn: 153345
2012-03-23 23:06:45 +00:00
Dan Gohman e3ed2b0699 Don't convert objc_retainAutoreleasedReturnValue to objc_retain if it
is retaining the return value of an invoke that it immediately follows.

llvm-svn: 153344
2012-03-23 18:09:00 +00:00
Dan Gohman 5c70fadc17 It's not possible to insert code immediately after an invoke in the
same basic block, and it's not safe to insert code in the successor
blocks if the edges are critical edges. Splitting those edges is
possible, but undesirable, especially on the unwind side. Instead,
make the bottom-up code motion to consider invokes to be part of
their successor blocks, rather than part of their parent blocks, so
that it doesn't push code past them and onto the edges. This fixes
PR12307.

llvm-svn: 153343
2012-03-23 17:47:54 +00:00
Owen Anderson add6f1d2e9 Make it feasible for clients using EngineBuilder to capture the TargetMachine that is created as part of selecting the appropriate target.
This is necessary if the client wants to be able to mutate TargetOptions (for example, fast FP math mode) after the initial creation of the ExecutionEngine.

llvm-svn: 153342
2012-03-23 17:40:56 +00:00
Lang Hames 45c6d21ae1 Add support for register masks to PBQP.
llvm-svn: 153341
2012-03-23 17:33:42 +00:00
Timur Iskhodzhanov 99cc6235bc [ASan/tests] Make 'noinline' and a bunch of other stuff portable
llvm-svn: 153333
2012-03-23 13:10:59 +00:00
Timur Iskhodzhanov f392910965 [ASan] replace '#if ... or ...' with '#if ... || ...'
llvm-svn: 153332
2012-03-23 12:21:47 +00:00
Tobias Grosser 5e8ffa83c0 CodeGen: Remove the need for setIVS
llvm-svn: 153331
2012-03-23 12:20:36 +00:00
Tobias Grosser ebf3008ec6 CodeGen: Simplify Variable Names
llvm-svn: 153330
2012-03-23 12:20:32 +00:00
Benjamin Kramer a5177e63a6 Include cctype for std::isprint.
This should unbreak the msvc build.

llvm-svn: 153329
2012-03-23 11:49:32 +00:00
Benjamin Kramer b0640db80e Include cstdio in a few place that depended on getting it transitively through StringExtras.h
llvm-svn: 153328
2012-03-23 11:35:30 +00:00
Timur Iskhodzhanov 72859836ab [ASan] Add a few more malloc-related interceptors for Windows
llvm-svn: 153327
2012-03-23 11:33:02 +00:00
Benjamin Kramer cbf108eda6 Move ftostr into its last user (cppbackend) and simplify it a bit.
New code should use raw_ostream.

llvm-svn: 153326
2012-03-23 11:26:29 +00:00
Tobias Grosser f74a4cd3dd CodeGen: Extract the LLVM-IR generaction of scalar and OpenMP loops.
We create a new file LoopGenerators that provides utility classes for the
generation of OpenMP parallel and scalar loops. This means we move a lot
of the OpenMP generation out of the Polly specific code generator.

llvm-svn: 153325
2012-03-23 10:35:18 +00:00
Anton Korobeynikov 17327b5852 Add soname to LLVM shared library on Linux. Probably the same stuff is necessary for *BSD.
Patch from Mageia!

llvm-svn: 153324
2012-03-23 10:00:42 +00:00
Duncan Sands a11ef6e4ea When propagating equalities, eg replacing A with B in every basic block
dominated by Root, check that B is available throughout the scope.  This
is obviously true (famous last words?) given the current logic, but the
check may be helpful if more complicated reasoning is added one day.

llvm-svn: 153323
2012-03-23 08:45:52 +00:00
Duncan Sands 8f897dc88b Indentation.
llvm-svn: 153322
2012-03-23 08:29:04 +00:00
Tobias Grosser 46fc9ca53f CodeGen: Change some variables to uppercase
No functional changes intended.

llvm-svn: 153321
2012-03-23 08:24:10 +00:00
Tobias Grosser cf88d84d79 test: Remove memaccess prefix
The prefix is not needed, as all test cases are already in a separate folder.

llvm-svn: 153320
2012-03-23 08:24:04 +00:00
Tobias Grosser d6adda3071 CodeGen: Full support for isl_pw expressions in modified access functions.
This also adds support for modifiable write accesses (until now only read
accesses where supported). We currently do not derive an exact type for the
expression, but assume that i64 is good enough. This will be improved in future
patches.

Contributed by: Yabin Hu <yabin.hwu@gmail.com>

llvm-svn: 153319
2012-03-23 08:21:22 +00:00
Tobias Grosser 3e72197efc IndVarSimplify: Disable simplifyIVUsers
This functionality is not available in LLVM trunk and breaks the compilation of
Polly. This patch fixes the compilation, but may not be enough to recover all
functionality.

llvm-svn: 153318
2012-03-23 08:02:19 +00:00
Tobias Grosser d87492bb8c IndVarSimplify: Adapt to changes in LLVM trunk
Contributed-By: Andrew Trick <atrick@apple.com>
llvm-svn: 153317
2012-03-23 08:02:15 +00:00
Tobias Grosser d1f12db70e IndVarSimplify: Proberly initialize the pass.
llvm-svn: 153316
2012-03-23 08:02:05 +00:00
Bill Wendling 00623787c0 Ignore the last message.
llvm-svn: 153315
2012-03-23 07:22:49 +00:00
Bill Wendling 947f92869a Revert patch. It broke the build.
llvm-svn: 153314
2012-03-23 07:21:18 +00:00
Bill Wendling 7389acda89 Dematerialize the source functions after we're done with them. This saves a bit
of memory during LTO.

llvm-svn: 153313
2012-03-23 07:18:22 +00:00
Ted Kremenek 888ac96f2b Update checker build.
llvm-svn: 153312
2012-03-23 07:06:16 +00:00
Ted Kremenek 161046edab Avoid applying retain/release effects twice in RetainCountChecker when a function call was inlined (i.e., we do not need to apply summaries in such cases).
llvm-svn: 153309
2012-03-23 06:26:56 +00:00
Eric Christopher aefeaa9873 Remove the vestiges of the C backend.
llvm-svn: 153308
2012-03-23 05:51:52 +00:00
Eric Christopher 64a232343a Remove the C backend.
llvm-svn: 153307
2012-03-23 05:50:46 +00:00
Eric Christopher bdb64495c4 Fix up cmake build.
llvm-svn: 153306
2012-03-23 03:55:14 +00:00
Eric Christopher 3c0d51661f Take out the debug info probe stuff. It's making some changes to
the PassManager annoying and should be reimplemented as a decorator
on top of existing passes (as should the timing data).

llvm-svn: 153305
2012-03-23 03:54:05 +00:00
Richard Smith 7d137e3b98 Support for definitions of member enumerations of class templates outside the
class template's definition, and for explicit specializations of such enum
members.

llvm-svn: 153304
2012-03-23 03:33:32 +00:00
Argyrios Kyrtzidis a754a03550 [libclang] For a CXCursor_ObjCInstanceMethodDecl/CXCursor_ObjCClassMethodDecl cursor,
return from clang_getCursorLocation the start location of the method name.

rdar://11105223

llvm-svn: 153303
2012-03-23 03:33:19 +00:00
Anton Yartsev edb062887f corrected check::EndOfTranslationUnit checker name and added 'const' to declaration
llvm-svn: 153302
2012-03-23 02:43:24 +00:00
Johnny Chen 760c54e640 Fix a typo.
llvm-svn: 153301
2012-03-23 01:28:19 +00:00
Johnny Chen 3f8140a6d8 Make arm debugserver handle setting a watchpoint on, for example, (uint64_t)variable.
We do this by delegating to two available Watchpoint Register Pairs (wvr, wcr).  With
each pair handling the 4 bytes of (uint64_t)variable.

llvm-svn: 153300
2012-03-23 01:24:52 +00:00
Greg Clayton aaaec7cf1f Bumped Xcode project versions for lldb-134 and debugserver-183.
llvm-svn: 153298
2012-03-23 01:04:39 +00:00
Argyrios Kyrtzidis 5f172a3301 [CFG] Cache boolean evaluations of expressions to avoid multiple re-evaluations
during construction of branches for chained logical operators.

This makes -fsyntax-only for test/Sema/many-logical-ops.c about 32x times faster.

With measuring SemaExpr.cpp I see differences below the noise level.

llvm-svn: 153297
2012-03-23 00:59:17 +00:00
Nick Lewycky c7c66e4db4 Explicitly close optionally closed <li> tags.
llvm-svn: 153296
2012-03-23 00:56:26 +00:00