Commit Graph

146562 Commits

Author SHA1 Message Date
Hal Finkel f8ac57e289 Implement FRINT lowering on PPC using frin
Like nearbyint, rint can be implemented on PPC using the frin instruction. The
complication comes from the fact that rint needs to set the FE_INEXACT flag
when the result does not equal the input value (and frin does not do that). As
a result, we use a custom inserter which, after the rounding, compares the
rounded value with the original, and if they differ, explicitly sets the XX bit
in the FPSCR register (which corresponds to FE_INEXACT).

Once LLVM has better modeling of the floating-point environment we should be
able to (often) eliminate this extra complexity.

llvm-svn: 178362
2013-03-29 19:41:55 +00:00
Adrian Prantl 0f6df00e4d Bugfix/Followup for r177086.
* Store the .block_descriptor (instead of self) in the alloca so we
  can guarantee that all captured variables are available at -O0.
* Add the missing OpDeref for the alloca.
rdar://problem/12767564

llvm-svn: 178361
2013-03-29 19:20:35 +00:00
Adrian Prantl de17db30d8 Improvement on r177086.
* Let DIType for block-captured self to point to the completed cached
  interface type.
rdar://problem/12767564

llvm-svn: 178360
2013-03-29 19:20:29 +00:00
Akira Hatanaka 7b8b9b9abf [mips] Define a function which returns the GPR register class.
llvm-svn: 178359
2013-03-29 19:17:42 +00:00
Jyotsna Verma 3abdf1c815 Hexagon: Set Hexagon tool-chain when configured as OSless target.
llvm-svn: 178358
2013-03-29 19:09:20 +00:00
Andrew Trick d97ff1fcee Fix TableGen subtarget-emitter to handle A9/Swift.
A9 uses itinerary classes, Swift uses RW lists. This tripped some
verification when we're expanding variants. I had to refine the
verification a bit.

llvm-svn: 178357
2013-03-29 19:08:31 +00:00
Matt Arsenault 19f773be37 Build fixes for STLPort + GCC
llvm-svn: 178356
2013-03-29 18:48:45 +00:00
Matt Arsenault 2080ecd107 Fix loop style
llvm-svn: 178355
2013-03-29 18:48:42 +00:00
Howard Hinnant 9cb970074f Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624.
llvm-svn: 178354
2013-03-29 18:27:28 +00:00
Adrian Prantl 4b7cf64f66 Split the llvm/tools/clang/test/CodeGenObjC/debug-info-blocks.m testcase into a CFE and LLVM part.
rdar://problem/12767564

llvm-svn: 178353
2013-03-29 18:08:14 +00:00
Greg Clayton 7e1c95a565 Updated the code signing docs.
llvm-svn: 178352
2013-03-29 17:53:55 +00:00
Benjamin Kramer dbcf50376e Remove sign-compare warning on systems that still use 32 bit time_ts.
llvm-svn: 178351
2013-03-29 17:39:43 +00:00
Howard Hinnant 84718fde7a The 3rd test in shrink_to_fit.pass.cpp can't possibly pass if exceptions are disabled, so #ifdef'ing out the test.
llvm-svn: 178350
2013-03-29 17:20:04 +00:00
Benjamin Kramer 70671b9937 Remove the old CodePlacementOpt pass.
It was superseded by MachineBlockPlacement and disabled by default since LLVM 3.1.

llvm-svn: 178349
2013-03-29 17:14:24 +00:00
Greg Clayton 7d2ef16cb3 <rdar://problem/12022060>
Enable tab completion for regular expression commands.

llvm-svn: 178348
2013-03-29 17:03:23 +00:00
Nadav Rotem 6036f581aa Fix a typo
llvm-svn: 178346
2013-03-29 16:34:23 +00:00
Jyotsna Verma 26226cea4b Hexagon: Disable DwarfUsesInlineInfoSection flag.
llvm-svn: 178345
2013-03-29 15:46:12 +00:00
Kostya Serebryany 91952cda76 [tsan] restore performance critical inlining in tsan: remove static from ALWAYS_INLINE, use ALWAYS_INLINE USED for critical functions.
llvm-svn: 178341
2013-03-29 09:44:16 +00:00
Alexander Potapenko b042555cd3 [TSan] Build TSan runtime with -fPIE.
This removes all register spills from the performance-critical __tsan_{read,write}{1,2,4,8} functions when the host compiler is GCC.

llvm-svn: 178340
2013-03-29 09:44:11 +00:00
Alexander Potapenko 389b45061f [libsanitizer] Put COMMON_CFLAGS/COMMON_CXXFLAGS before Tmp.CFLAGS to let the config-specific flags override common flags.
llvm-svn: 178339
2013-03-29 09:41:10 +00:00
Hal Finkel c20a08d25b Add PPC FP rounding instructions fri[mnpz]
These instructions are available on the P5x (and later) and on the A2. They
implement the standard floating-point rounding operations (floor, trunc, etc.).
One caveat: frin (round to nearest) does not implement "ties to even", and so
is only enabled in fast-math mode.

llvm-svn: 178337
2013-03-29 08:57:48 +00:00
Alexey Samsonov 703a9870a2 [Sanitizer] Follow-up for r178238 - replace DCHECKs with regular CHECKs
llvm-svn: 178336
2013-03-29 08:03:01 +00:00
Rafael Espindola 069ab0345b Fix thinko (and the bots): We still want to warn in C.
llvm-svn: 178335
2013-03-29 07:56:05 +00:00
Rafael Espindola de65751493 Revert "Fix allocations of SmallVector and SmallPtrSet so they are more prone to"
This reverts commit 617330909f0c26a3f2ab8601a029b9bdca48aa61.

It broke the bots:

/home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:150: PushPopTest
/home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:118: Failure
Value of: v[i].getValue()
  Actual: 0
Expected: value
Which is: 2

llvm-svn: 178334
2013-03-29 07:11:21 +00:00
Rafael Espindola 980c053cb9 Don't special case one line extern "C" decls.
We already avoided warning for

extern "C" const char *Version_string = "2.9";

now we also don't produce any warnings for

extern "C" {
  extern const char *Version_string2 = "2.9";
}

llvm-svn: 178333
2013-03-29 07:02:31 +00:00
Jean-Luc Duprat 67ce1472b4 Fix allocations of SmallVector and SmallPtrSet so they are more prone to
being power-of-two sized.

llvm-svn: 178332
2013-03-29 05:45:22 +00:00
Michael Liao ffaae3511a Add RDSEED intrinsic support defined in AVX2 extension
llvm-svn: 178331
2013-03-29 05:17:55 +00:00
Michael Liao 4442f796a4 Add XTEST intrinsic defined in TSX extension
llvm-svn: 178330
2013-03-29 05:14:06 +00:00
Michael Gottesman 60f6b28c58 Removed trailing whitespace.
llvm-svn: 178329
2013-03-29 05:13:07 +00:00
Akira Hatanaka f05e9ad59f [mips] Change type of accumulator registers to Untyped. Add two more accumulator
register classes for Mips64 and DSP-ASE.

No functionality changes.

llvm-svn: 178328
2013-03-29 03:27:21 +00:00
Akira Hatanaka 465faccafa [mips] Define overloaded versions of storeRegToStack and loadRegFromStack.
No functionality changes.

llvm-svn: 178327
2013-03-29 02:14:12 +00:00
Akira Hatanaka 11184e4c8c [mips] Add parameter Alignment to MipsFrameLowering's constructor.
No functionality changes.

llvm-svn: 178326
2013-03-29 01:51:04 +00:00
Jim Ingham 8af3b9ca67 Rationalize how we do Halt-ing before Destroy and Detach.
<rdar://problem/13527167>

llvm-svn: 178325
2013-03-29 01:18:12 +00:00
Jim Ingham dcb1d856d7 “process launch” should “detach” not “kill” if the current process was one we attached to.
“process attach” should ask the same questions as process launch if there is a current process.
“process connect” then “process launch” or “process attach” should actually work.

<rdar://problem/13524210>
<rdar://problem/13524208>
<rdar://problem/13488919>

llvm-svn: 178324
2013-03-29 00:56:30 +00:00
Shankar Easwaran bb9d4a5ca0 [ELF] Add dynamic hash table and get simple dynamic libraries working with Hexagon
llvm-svn: 178323
2013-03-29 00:53:25 +00:00
Ted Kremenek f82d578f9d [cfg] Always guard (when AddStaticInitBranches == true) DeclStmts for static variables, not just ones with explicit initializers
llvm-svn: 178322
2013-03-29 00:42:56 +00:00
Ted Kremenek 1f8e65d88e [analyzer] Add static initializer test case (from <rdar://problem/13227740>).
llvm-svn: 178321
2013-03-29 00:32:36 +00:00
Timur Iskhodzhanov 554bdc66a4 Revert r178273 as it broke the Linux bootstrap due to false positives
llvm-svn: 178320
2013-03-29 00:22:03 +00:00
Dan Gohman f6169d020c Revert r178166. According to Howard, this code is actually ok.
llvm-svn: 178319
2013-03-29 00:13:08 +00:00
Ted Kremenek 338c3aa8d1 Add static analyzer support for conditionally executing static initializers.
llvm-svn: 178318
2013-03-29 00:09:28 +00:00
Ted Kremenek 233c1b0c77 Add configuration plumbing to enable static initializer branching in the CFG for the analyzer.
This setting still isn't enabled yet in the analyzer.  This is
just prep work.

llvm-svn: 178317
2013-03-29 00:09:22 +00:00
Jack Carter 311246c6d5 [Mips Assembler] Add support for OR macro with imediate opperand
Mips assembler supports macros that allows the OR instruction 
to have an immediate parameter. This patch adds an instruction 
alias that converts this macro into a Mips ORI instruction. 

Contributer: Vladimir Medic
llvm-svn: 178316
2013-03-28 23:45:13 +00:00
Greg Clayton 3faf47c462 <rdar://problem/11730263>
PC relative loads are missing disassembly comments when disassembled in a live process.

This issue was because some sections, like __TEXT and __DATA in libobjc.A.dylib, were being moved when they were put into the dyld shared cache. This could also affect any other system that slides sections individually.

The solution is to keep track of wether the bytes we will disassemble are from an executable file (file address), or from a live process (load address). We now do the right thing based off of this input in all cases.

llvm-svn: 178315
2013-03-28 23:42:53 +00:00
Michael Liao a486a11dcf Add support of RDSEED defined in AVX2 extension
llvm-svn: 178314
2013-03-28 23:41:26 +00:00
Fariborz Jahanian 3b602ce5a4 Objective-C: Produce precise diagnostic when
'isa' ivar is accessed provided it is the first
ivar. Fixit hint will follow in another patch.
This is continuation of // rdar://13503456

llvm-svn: 178313
2013-03-28 23:39:11 +00:00
Michael Liao 5fff5c7b26 Enhance boolean simplification to handle 16-/64-bit RDRAND
- RDRAND always clears the destination value when a random value is not
  available (i.e. CF == 0). This value is truncated or zero-extended as
  the false boolean value to be returned. Boolean simplification needs
  to skip this 'zext' or 'trunc' node.

llvm-svn: 178312
2013-03-28 23:38:52 +00:00
Anna Zaks 4b04e66c4f [analyzer] Document existence of ConstPointerEscape.
llvm-svn: 178311
2013-03-28 23:15:32 +00:00
Anna Zaks 333481b90b [analyzer] Add support for escape of const pointers and use it to allow “newed” pointers to escape
Add a new callback that notifies checkers when a const pointer escapes. Currently, this only works
for const pointers passed as a top level parameter into a function. We need to differentiate the const
pointers escape from regular escape since the content pointed by const pointer will not change;
if it’s a file handle, a file cannot be closed; but delete is allowed on const pointers.

This should suppress several false positives reported by the NewDelete checker on llvm codebase.

llvm-svn: 178310
2013-03-28 23:15:29 +00:00
Anna Zaks 05fb371efc [analyzer] Apply the suppression rules to the nil receiver only if the value participates in the computation of the nil we warn about.
We should only suppress a bug report if the IDCed or null returned nil value is directly related to the value we are warning about. This was
not the case for nil receivers - we would suppress a bug report that had an IDCed nil receiver on the path regardless of how it’s
related to the warning.

1) Thread EnableNullFPSuppression parameter through the visitors to differentiate between tracking the value which
is directly responsible for the bug and other values that visitors are tracking (ex: general tracking of nil receivers).
2) in trackNullOrUndef specifically address the case when a value of the message send is nil due to the receiver being nil.

llvm-svn: 178309
2013-03-28 23:15:22 +00:00
Michael Liao 96b42608ab Skip moving call address loading into callseq when targets prefer register indirect call.
To enable a load of a call address to be folded with that call, this
load is moved from outside of callseq into callseq. Such a moving
adds a non-glued node (that load) into a glued sequence. This non-glue
load is only removed when DAG selection folds them into a memory form
call instruction. When such instruction selection is disabled, it breaks
DAG schedule.

To prevent that, such moving is disabled when target favors register
indirect call.

Previous workaround disabling CALL32m/CALL64m insn selection is removed.

llvm-svn: 178308
2013-03-28 23:13:21 +00:00