Commit Graph

136467 Commits

Author SHA1 Message Date
Benjamin Kramer 24c643b6de DependenceAnalysis: Don't crash if there is no constant operand.
This makes the code match the comments. Resolves a crash in loop idiom (PR14219).

llvm-svn: 167110
2012-10-31 09:20:38 +00:00
James Molloy 2f728a9185 Add support for ARM segment types PT_ARM_ARCHEXT, PT_ARM_EXIDX and PT_ARM_UNWIND.
Patch by Pete Chou!

llvm-svn: 167109
2012-10-31 09:10:56 +00:00
James Molloy 3ebe7a5a5b Add support for Cortex-A15 host recognition.
No testcase, as this is only testable on a C-A15 board.

llvm-svn: 167108
2012-10-31 09:07:37 +00:00
Reed Kotler 27a7229c47 Implement ADJCALLSTACKUP and ADJCALLSTACKDOWN
llvm-svn: 167107
2012-10-31 05:21:10 +00:00
Craig Topper 8cd3b07a51 Add scalar forms of FMA4 VFNMSUB/VFNMADD to folding tables. Patch from Cameron McInally.
llvm-svn: 167106
2012-10-31 04:59:46 +00:00
Meador Inge 6f8e01121a instcombine: Migrate strpbrk optimizations
This patch migrates the strpbrk optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167105
2012-10-31 04:29:58 +00:00
Michael Liao e2d7e4e8e5 Clean up redundant SP register maintained in X86 TLI
llvm-svn: 167104
2012-10-31 04:14:09 +00:00
Meador Inge d589ac621b instcombine: Migrate strlen optimizations
This patch migrates the strlen optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167103
2012-10-31 03:33:06 +00:00
Meador Inge 067294b3ac instcombine: Migrate strncpy optimizations
This patch migrates the strncpy optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167102
2012-10-31 03:33:00 +00:00
Nadav Rotem ce77ab0c24 LoopVectorize: Do not vectorize loops with tiny constant trip counts.
llvm-svn: 167101
2012-10-31 03:31:07 +00:00
Rafael Espindola fbc567ed05 Remove empty directories.
llvm-svn: 167100
2012-10-31 02:34:48 +00:00
Anna Zaks 1e80d8b49c [analyzer] SimpleStreamChecker - remove evalAssume and other refinements
llvm-svn: 167099
2012-10-31 02:32:41 +00:00
Rafael Espindola ebc56b217b Remove really old benchmark data.
llvm-svn: 167098
2012-10-31 02:29:15 +00:00
Sean Callanan 256cf2cb49 Rmoved a duplicate version of SetSelectedThreadByID
that confused external clients.

<rdar://problem/12599528>

llvm-svn: 167097
2012-10-31 02:12:08 +00:00
Sean Callanan 5bb2673fc8 Removed some spurious files from our Copy
Headers build phase.

llvm-svn: 167096
2012-10-31 02:03:31 +00:00
Sean Callanan 4ac7ec7341 Fixed a crash when we couldn't create a
CXXMethodDecl but tried to manipulate it
anyway.

<rdar://problem/12601996>

llvm-svn: 167095
2012-10-31 02:01:58 +00:00
Jason Molenda e2db91b8b0 Fix the bit pattern for vst1 in EmulateInstructionARM::GetThumbOpcodeForInstruction
so it is recognized correctly.  The second patch needed for <rdar://problem/10652166>.

llvm-svn: 167094
2012-10-31 02:00:46 +00:00
Rafael Espindola 69aa04dd8f Remove the -ccc-no-clang option.
llvm-svn: 167093
2012-10-31 01:21:20 +00:00
Anna Zaks 7bd0674dea [analyzer]Don't invalidate const arguments when there is no
IdentifierInfo.

Ee: C++ copy constructors.
llvm-svn: 167092
2012-10-31 01:18:26 +00:00
Anna Zaks 408f7d0144 Address Jordan's review: comments, spaces.
llvm-svn: 167091
2012-10-31 01:18:22 +00:00
Bill Schmidt 9953cf294b This patch addresses an ABI compatibility issue with empty aggregate
parameters.  Examples of these are:

  struct { } a;
  union { } b[256];
  int a[0];

An empty aggregate has an address, although dereferencing that address is
pointless.  When passed as a parameter, an empty aggregate does not consume
a protocol register, nor does it consume a doubleword in the parameter save
area.  Passing an empty aggregate by reference passes an address just as
for any other aggregate.  Returning an empty aggregate uses GPR3 as a hidden
address of the return value location, just as for any other aggregate.

The patch modifies PPCTargetLowering::LowerFormalArguments_64SVR4 and
PPCTargetLowering::LowerCall_64SVR4 to properly skip empty aggregate
parameters passed by value.  The handling of return values and by-reference
parameters was already correct.

Built on powerpc64-unknown-linux-gnu and tested with no new regressions.
A test case is included to test proper handling of empty aggregate
parameters on both sides of the function call protocol.

llvm-svn: 167090
2012-10-31 01:15:05 +00:00
Seth Cantrell d7beb4a10a add test for r167063
llvm-svn: 167089
2012-10-31 01:03:35 +00:00
Akira Hatanaka d837be780d Change signature of function RAFast::spillAll to avoid conversion between
type MachineInstr* and MachineBasicBlock::iterator.

llvm-svn: 167088
2012-10-31 00:56:01 +00:00
Rafael Espindola 7edf38f7e3 xlc supports __attribute__((aligned(x))), use it.
Patch by Kai.

llvm-svn: 167087
2012-10-31 00:54:26 +00:00
Akira Hatanaka ebb31e9c42 Check that iterator I is not the end iterator.
llvm-svn: 167086
2012-10-31 00:50:52 +00:00
Rafael Espindola c14b96898a Add extra declarations of hash_value needed to build llvm with xlc 12.1.
Patch by Kai!

llvm-svn: 167085
2012-10-31 00:46:18 +00:00
Nadav Rotem ff7889196b Add support for loops that don't start with Zero.
This is important for loops in the LAPACK test-suite.
These loops start at 1 because they are auto-converted from fortran.

llvm-svn: 167084
2012-10-31 00:45:26 +00:00
Meador Inge 9a6a190562 instcombine: Migrate stpcpy optimizations
This patch migrates the stpcpy optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.  Note that the
__stpcpy_chk simplifications were migrated in a previous commit.

llvm-svn: 167083
2012-10-31 00:20:56 +00:00
Meador Inge cdb2ca54ae instcombine: Split out the __stpcpy_chk simplifications from StrCpyChkOpt
r166198 migrated the strcpy optimization to instcombine.  The strcpy
simplifier that was migrated from Transforms/Scalar/SimplifyLibCalls.cpp
was also doing some __strcpy_chk simplifications.  Those fortified
simplifications were migrated as well, but introduced a bug in the
__stpcpy_chk simplifier in the process.  This happened because the
__strcpy_chk and __stpcpy_chk simplifiers were both mapped to StrCpyChkOpt
which was updated with simplifications that worked for __strcpy_chk, but
not __stpcpy_chk.

This patch fixes the problem by adding proper test coverage and creating a
new simplifier for __stpcpy_chk (instead of sharing one with __strcpy_chk).

llvm-svn: 167082
2012-10-31 00:20:51 +00:00
Enrico Granata 085577f8d0 <rdar://problem/12586188> Make ImportError a special case for "command script import", such that the error message for the exception becomes the error for the entire import operation
and silence the backtrace printout

In the process, refactor the Execute* commands in ScriptInterpreter to take an options object, and add a new setting to not mask out errors so that the callers can handle them directly
instead of having the default behavior

llvm-svn: 167067
2012-10-31 00:01:26 +00:00
Greg Clayton c280746b8c <rdar://problem/12602978>
RegisterContextKDP_i386 was not correctly writing registers due to missing "virtual" keywords. Added the virtual keywords and made the functions pure virtual to ensure subclasses can't get away without implementing these functions.

llvm-svn: 167066
2012-10-30 23:57:32 +00:00
Greg Clayton 2fb45d0aff Fixed build warnings.
llvm-svn: 167065
2012-10-30 23:56:14 +00:00
Manman Ren 6b223a4f06 X86 SSE: update rsqrtss and rcpss to use two source operands and
the first source operand is tied to the destination operand.

This is to accurately model the corresponding instructions where the upper
bits are unmodified.

rdar://12558838
PR14221

llvm-svn: 167064
2012-10-30 23:53:59 +00:00
Seth Cantrell 4902e033b5 isLegalUTF8() was giving the wrong answer
invalid but not caught by isLegalUTF8(): 0xED 0x75 0x84

llvm-svn: 167063
2012-10-30 23:50:26 +00:00
Rafael Espindola 74c5fd93b9 Remove ccc-no-clang-cpp, which is also dead now.
llvm-svn: 167062
2012-10-30 23:49:11 +00:00
Jim Ingham 5fdeed4e9f Make blocks that capture their containing method's object pointer look like methods of
the containing class so that direct ivar access will work in the expression parser.

<rdar://problem/9797999>

llvm-svn: 167061
2012-10-30 23:35:54 +00:00
Jim Ingham 2cffda3ff8 Change a couple of raw printf's to expression log output.
llvm-svn: 167060
2012-10-30 23:34:07 +00:00
David Blaikie a0613170b4 Handle string encoding diagnostics when there are too many invalid ranges.
llvm-svn: 167059
2012-10-30 23:22:22 +00:00
Manman Ren 2a523d864d ARM AAPCS-VFP: fix handling of homogeneous aggreate.
If HA can only partially fit into VFP registers, we add padding to make sure
HA will be on stack and later VFP CPRCs will be on stack as well.

llvm-svn: 167058
2012-10-30 23:21:41 +00:00
Eli Friedman fc1f2cd3e5 Fix regression in old-style JIT.
llvm-svn: 167057
2012-10-30 22:21:55 +00:00
Manman Ren acb8becc73 X86 MMX: optimize transfer from mmx to i32
We used to generate a store (movq) + a load.
Now we use movd.

rdar://9946746

llvm-svn: 167056
2012-10-30 22:15:38 +00:00
Nadav Rotem 47a299dcc9 Add documentation.
llvm-svn: 167055
2012-10-30 22:06:26 +00:00
Chad Rosier 616e8a5c0b [driver] Older versions of ld expect '-L<dir>' not '-L <dir>'. In Xcode4 and
later, '-L <dir>' is allowed, but rewrite these in the driver as '-L<dir>' to
maintain backward compatibility.  The same is true for the -I option.
rdar://12366753

llvm-svn: 167054
2012-10-30 21:42:09 +00:00
Eric Christopher 206cf6487c Reformat and 80-column this. It's not strictly conforming
yet, but it's better.

llvm-svn: 167053
2012-10-30 21:36:43 +00:00
Jason Molenda 055c57b7ce Change the MacOSX Symbols::DownloadObjectAndSymbolFile to look up
"~rc" via getpwnam() instead of doing tilde expansion and doing soft-link
dereferencing via realpath() - if we're pointing to a softlink, leave it
as-is.  
<rdar://problem/12597698>

llvm-svn: 167052
2012-10-30 21:26:30 +00:00
Chandler Carruth 1296b59522 Fix PR14212: For some strange reason I treated vectors differently from
integers in that the code to handle split alloca-wide integer loads or
stores doesn't come first. It should, for the same reasons as with
integers, and the PR attests to that. Also had to fix a busted assert in
that this test case also covers.

llvm-svn: 167051
2012-10-30 20:52:40 +00:00
Chad Rosier 909f6a035f [inline asm] Get the mayLoad/mayStore directly from the MIOp_ExtraInfo operand.
llvm-svn: 167050
2012-10-30 20:39:19 +00:00
Hal Finkel 08f34ac9dd BBVectorize: Cache fixed-order pairs instead of recomputing pointer info.
Instead of recomputing relative pointer information just prior to fusing,
cache this information (which also needs to be computed during the
candidate-pair selection process). This cuts down on the total number of
SE queries made, and also is a necessary intermediate step on the road toward
including shuffle costs in the pair selection procedure.

No functionality change is intended.

llvm-svn: 167049
2012-10-30 20:17:37 +00:00
Akira Hatanaka 9c962c02e4 [mips] Allow tail-call optimization for vararg functions and functions which
use the caller's stack.

llvm-svn: 167048
2012-10-30 20:16:31 +00:00
Fariborz Jahanian 39319c480e objective-C arc/mrr: Another patch for the new captured block variable
layout meta-data.  It is currently off (so no tests). This is wip.

llvm-svn: 167047
2012-10-30 20:05:29 +00:00