Commit Graph

131392 Commits

Author SHA1 Message Date
Jack Carter 612c66314c The Mips64InstrInfo.td definitions DynAlloc64 LEA_ADDiu64
were using a class defined for 32 bit instructions and 
thus the instruction was for addiu instead of daddiu.

This was corrected by adding the instruction opcode as a 
field in the  base class to be filled in by the defs.

llvm-svn: 161359
2012-08-06 23:29:06 +00:00
Anna Zaks 05253782a4 [analyzer] Dynamic type info - propagate through implicit casts.
I currently have a bit of redundancy with the cast kind switch statement
inside the ImplicitCast callback, but I might be adding more casts going
forward.

llvm-svn: 161358
2012-08-06 23:25:45 +00:00
Anna Zaks 472dbcf156 [analyzer] Add a checker to manage dynamic type propagation.
Instead of sprinkling dynamic type info propagation throughout
ExprEngine, the added checker would add the more precise type
information on known APIs (Ex: ObjC alloc, new) and propagate
the type info in other cases (ex: ObjC init method, casts (the second is
not implemented yet)).

Add handling of ObjC alloc, new and init to the checker.

llvm-svn: 161357
2012-08-06 23:25:39 +00:00
Bill Wendling 45f74e313b Reduce indentation by early exiting.
llvm-svn: 161356
2012-08-06 22:52:45 +00:00
David Blaikie 131fcb4a06 Refactor checks for unevaluated contexts into a common utility function.
The one caller that's surrounded by nearby code manipulating the underlying
evaluation context list is left unmodified for readability.

Review by Sean Silva and Richard Smith.

llvm-svn: 161355
2012-08-06 22:47:24 +00:00
Jakob Stoklund Olesen 2da09fd794 Fix typo.
llvm-svn: 161354
2012-08-06 22:34:51 +00:00
Bill Wendling b8dcda77d9 Add a way to grab the target options from the LTO command line.
When the command line target options were removed from the LLVM libraries, LTO
lost its ability to specify things like `-disable-fp-elim'. Add this back by
adding the command line variables to the `lto' project.
<rdar://problem/12038729>

llvm-svn: 161353
2012-08-06 21:34:54 +00:00
Dmitri Gribenko 8e5d5f1feb Comment AST: DeclInfo: collapse a bunch of boolean flags into an enum.
llvm-svn: 161352
2012-08-06 21:31:15 +00:00
Jordan Rose a3e3343e51 [analyzer] Add plist output checks for all four "path notes" tests.
No functionality change, but from now on, any new path notes should be
tested both with plain-text output (for ease of human auditing) and with
plist output (to ensure control flow and events are being correctly
represented in Xcode).

llvm-svn: 161351
2012-08-06 21:28:14 +00:00
Jordan Rose e32e153f7d [analyzer] Improve arrow locations for PseudoObjectExprs.
llvm-svn: 161350
2012-08-06 21:28:11 +00:00
Jordan Rose 1c715609df [analyzer] Ignore OS X 10.8's annotations for NSMakeCollectable.
The frameworks correctly use the 'cf_consumed' and 'ns_returns_retained'
attributes for NSMakeCollectable, but we can model the behavior under
garbage collection more precisely than that.

No functionality change.

llvm-svn: 161349
2012-08-06 21:28:02 +00:00
Jack Carter 84491abb20 Mips relocations R_MIPS_HIGHER and R_MIPS_HIGHEST.
These 2 relocations gain access to the 
highest and the second highest 16 bits
of a 64 bit object.

R_MIPS_HIGHER %higher(A+S)
The %higher(x) function is [ (((long long) x + 0x80008000LL) >> 32) & 0xffff ]. 

R_MIPS_HIGHEST %highest(A+S)
The %highest(x) function is [ (((long long) x + 0x800080008000LL) >> 48) & 0xffff ]. 

llvm-svn: 161348
2012-08-06 21:26:03 +00:00
Hal Finkel 33e529d56b MFTB on PPC64 should really be encoded using MFSPR.
The MFTB instruction itself is being phased out, and its functionality
is provided by MFSPR. According to the ISA docs, using MFSPR works on all known
chips except for the 601 (which did not have a timebase register anyway)
and the POWER3.

Thanks to Adhemerval Zanella for pointing this out!

llvm-svn: 161346
2012-08-06 21:21:44 +00:00
Richard Trieu 43803f0951 For global record types, the self reference checker was called twice, resulting
in duplicate -Wuninitialized warnings.  Change so that only the check in
TryConstructorInitialization() will be used and a single warning be emitted.

llvm-svn: 161345
2012-08-06 21:09:23 +00:00
Eric Christopher 22738d00a3 Add support for the OpenBSD for Bitrig.
Patch by David Hill.

llvm-svn: 161344
2012-08-06 20:52:18 +00:00
Ted Kremenek b9ddbd3daa scan-build: factor out setting of environment variables.
llvm-svn: 161343
2012-08-06 20:19:19 +00:00
Chad Rosier c6c7133ed6 [ms-inline asm] Pass Tokens to Sema and store them in the AST. No functional
change intended.  No test case as there's no real way to test at this time.

llvm-svn: 161342
2012-08-06 20:03:45 +00:00
Simon Atanasyan a1f8c0ab93 Fix MIPS DSP Rev1 intrinsics memory properties.
The patch reviewed by Akira Hatanaka.

llvm-svn: 161333
2012-08-06 19:48:16 +00:00
Simon Atanasyan f679652ef6 Fix MIPS DSP Rev1 intrinsics memory properties.
The patch reviewed by Akira Hatanaka.

llvm-svn: 161332
2012-08-06 19:47:47 +00:00
Dmitri Gribenko a9770ad820 Comment parser and sema: remove useless return values
llvm-svn: 161331
2012-08-06 19:03:12 +00:00
Ted Kremenek 0d29bd231b Pull 'xcodebuild' wrapper logic into a separate function.
llvm-svn: 161330
2012-08-06 18:54:19 +00:00
Jakob Stoklund Olesen 8b7cfe33ec Put up warning signs around MO::getNextOperandForReg().
llvm-svn: 161329
2012-08-06 18:48:43 +00:00
Roman Divacky 7d6e08560b Remove empty overrides of processFunctionBeforeFrameFinalized().
llvm-svn: 161328
2012-08-06 18:14:18 +00:00
Dmitri Gribenko 5ec0c7536a Comment diagnostics: warn on duplicate \brief and \return commands.
Doxygen manual claims that multiple \brief or \returns commands will be merged
together, but actual behavior is different (second \brief command becomes a
part of a discussion, second \returns becomes a "Returns: blah" paragraph on
its own).  Anyway, it seems to be a bad idea to use multiple \brief or \returns
commands in a single command.

llvm-svn: 161325
2012-08-06 17:08:27 +00:00
Dmitri Gribenko 558babc53b Comment diagnostics: \return in void function: specialize diagnostic text for
ObjC methods.

llvm-svn: 161324
2012-08-06 16:29:26 +00:00
Greg Clayton e998267282 <rdar://problem/12029894>
Use the built in demangler for Apple builds for now which has needed demangling fixes, and make the cxa_demangle.cpp use rtti in the Xcode project settings as it requires it be enabled.

llvm-svn: 161323
2012-08-06 15:55:38 +00:00
Alexey Samsonov 941a6ec9bb [ASan] fix names of malloc/free replacements on Android
llvm-svn: 161322
2012-08-06 15:13:22 +00:00
Alexey Samsonov 0295edbfd5 [ASan] add new ASan option 'strip_path_prefix' to remove useless prefices from filenames in stack traces
llvm-svn: 161321
2012-08-06 13:00:21 +00:00
Alexander Potapenko 8f6dd3537c AllocationSize(ptr) should check that |ptr| actually points to the beginning of the chunk it belongs to.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=86

llvm-svn: 161320
2012-08-06 12:24:39 +00:00
Craig Topper ef3f5fe6bd Re-enable pcmpistri/pcmpestri builtins in clang now that llvm supports them properly.
llvm-svn: 161319
2012-08-06 07:07:06 +00:00
Craig Topper ab47fe4e16 Implement proper handling for pcmpistri/pcmpestri intrinsics. Requires custom handling in DAGISelToDAG due to limitations in TableGen's implicit def handling. Fixes PR11305.
llvm-svn: 161318
2012-08-06 06:22:36 +00:00
Richard Smith 403f76ee02 PR13529: Don't crash if the driver sees an unused input file when running as
'clang-cpp'.

For now, the test uses "REQUIRES: shell" to determine if the host system
supports "ln -s", which it uses to create a 'clang-cpp' symlink. This is a bit
hacky and should likely be directly supported by lit.cfg.

llvm-svn: 161317
2012-08-06 04:09:06 +00:00
Richard Smith 18f07db183 PR13499: Don't try to check whether 'override' has been validly applied until
we know whether the function is virtual. But check it as soon as we do know;
in some cases we don't need to wait for an instantiation.

llvm-svn: 161316
2012-08-06 03:25:17 +00:00
Richard Smith f716bb859b PR13527: don't assert if a function is explicitly defaulted when it's already
been defined.

llvm-svn: 161315
2012-08-06 02:25:10 +00:00
Peter Collingbourne 3cd1bcb358 Do not use linkonce_odr linkage in .ll files. This prevented them
from being linked into the library under lazy linkage.

llvm-svn: 161314
2012-08-05 22:25:48 +00:00
Peter Collingbourne a385c53413 PTX: move implementations of work-item and synchronisation functions
to lib, and add header files in generic.  Incorporates a patch by
Tom Stellard!

llvm-svn: 161313
2012-08-05 22:25:37 +00:00
Peter Collingbourne 1e373f07af Implement sub_sat builtin. Patch by Lei Mou!
llvm-svn: 161312
2012-08-05 22:25:12 +00:00
Peter Collingbourne 49b4d8cc65 Fix declarations of __clc_add_sat_*. Patch by Lei Mou!
llvm-svn: 161311
2012-08-05 22:24:36 +00:00
Hal Finkel 3fadbb54fd Add __builtin_readcyclecounter() to produce the @llvm.readcyclecounter() intrinsic.
llvm-svn: 161310
2012-08-05 22:03:08 +00:00
Howard Hinnant 1237dccaea std::equal operating on non-const __bit_iterators was not working. This fixes it.
llvm-svn: 161309
2012-08-05 21:43:11 +00:00
Howard Hinnant 73984be057 Andrew Morrow: The current CMake setup for libc++ incorrectly uses the variable
LLVM_ENABLE_ASSERTIONS instead of LIBCXX_ENABLE_ASSERTIONS when
figuring out what _DEBUG/NDEBUG defines to set. It also tries to test
the non-existent variable 'uppercase_CMAKE_BUILD_TYPE', which the top
level LLVM CMakeLists.txt sets up, but which the top level libc++
CMakeLists.txt currently does not. Changing the variable name tested
and creating the uppercase release name variable allows libc++ to
honor the LIBCXX_ENABLE_ASSERTIONS option correctly.

llvm-svn: 161308
2012-08-05 17:37:39 +00:00
Craig Topper 812005e562 Update test to check for r161305
llvm-svn: 161307
2012-08-05 09:06:28 +00:00
Craig Topper 6d0408d3a5 Remove custom inserter for MWAIT. It doesn't do anything that couldn't be represented in a pattern.
llvm-svn: 161306
2012-08-05 00:36:57 +00:00
Craig Topper 43ee9fae92 Use a COPY node instead of an explicit MOVA opcode in the custom insterter for pcmpestrm/pcmpistrm. Allows the register allocator to handle it better and prevent wasted identity moves.
llvm-svn: 161305
2012-08-05 00:17:48 +00:00
Benjamin Kramer e073177e06 Simplify code, no functionality change.
llvm-svn: 161303
2012-08-04 17:00:46 +00:00
Hal Finkel 70381a7b18 Add readcyclecounter lowering on PPC64.
On PPC64, this can be done with a simple TableGen pattern.
To enable this, I've added the (otherwise missing) readcyclecounter
SDNode definition to TargetSelectionDAG.td.

llvm-svn: 161302
2012-08-04 14:10:46 +00:00
Anton Korobeynikov ef731edf53 Skip impdef regs during eabi save/restore list emission to workaround PR11902
llvm-svn: 161301
2012-08-04 13:25:58 +00:00
Anton Korobeynikov 3a4fdfeceb Recognize vst1.64 / vld1.64 with 3 and 4 regs as load from / store to stack stuff
(this corresponds by spilling/reloading regs in DTriple / DQuad reg classes).
No testcase, found by inspection.

llvm-svn: 161300
2012-08-04 13:22:14 +00:00
Anton Korobeynikov 218aaf6d04 Add stack spill / reload instructions for DTriple and DQuad register classes, which
were missed for no reason. This fixes PR13377

llvm-svn: 161299
2012-08-04 13:16:12 +00:00
Bill Wendling 98f0b77048 Remove extraneous ';'.
llvm-svn: 161298
2012-08-04 10:31:40 +00:00