platform/upstream/llvm.git
11 years ago[analyzer] Rename ConditionTruthVal::isTrue to isConstrainedTrue.
Jordan Rose [Thu, 1 Nov 2012 00:18:27 +0000 (00:18 +0000)]
[analyzer] Rename ConditionTruthVal::isTrue to isConstrainedTrue.

(and the same for isFalse)

No functionality change.

llvm-svn: 167186

11 years agoFixed format strings to avoid pointer truncation during 64-bit debugging.
Andrew Kaylor [Thu, 1 Nov 2012 00:17:11 +0000 (00:17 +0000)]
Fixed format strings to avoid pointer truncation during 64-bit debugging.

llvm-svn: 167185

11 years agoCorrectly reject gotos in function-level try blocks. PR14225.
Eli Friedman [Wed, 31 Oct 2012 23:55:28 +0000 (23:55 +0000)]
Correctly reject gotos in function-level try blocks.  PR14225.

llvm-svn: 167184

11 years agoAdded the plists to the debugserver project and fixed the labels for the new plists.
Greg Clayton [Wed, 31 Oct 2012 23:49:14 +0000 (23:49 +0000)]
Added the plists to the debugserver project and fixed the labels for the new plists.

llvm-svn: 167183

11 years agoMore launchd style plists.
Greg Clayton [Wed, 31 Oct 2012 23:43:37 +0000 (23:43 +0000)]
More launchd style plists.

llvm-svn: 167182

11 years agoMC: Simple example parser for MC assembly markup.
Jim Grosbach [Wed, 31 Oct 2012 23:24:13 +0000 (23:24 +0000)]
MC: Simple example parser for MC assembly markup.

Nothing fancy, just a simple demonstration parser.

llvm-svn: 167181

11 years ago(For X86) Enhancement to add-carray/sub-borrow (adc/sbb) optimization.
Shuxin Yang [Wed, 31 Oct 2012 23:11:48 +0000 (23:11 +0000)]
(For X86) Enhancement to add-carray/sub-borrow (adc/sbb) optimization.

  The adc/sbb optimization is to able to convert following expression
into a single adc/sbb instruction:
  (ult) ... = x + 1 // where the ult is unsigned-less-than comparison
  (ult) ... = x - 1

  This change is to flip the "x >u y" (i.e. ugt comparison) in order
to expose the adc/sbb opportunity.

llvm-svn: 167180

11 years agoUse libxml2 on Mac OS X.
Filipe Cabecinhas [Wed, 31 Oct 2012 23:02:00 +0000 (23:02 +0000)]
Use libxml2 on Mac OS X.

llvm-svn: 167179

11 years ago[analyzer] Fix a bug in SimpleStreamChecker - return after sink.
Anna Zaks [Wed, 31 Oct 2012 22:17:48 +0000 (22:17 +0000)]
[analyzer] Fix a bug in SimpleStreamChecker - return after sink.

Thanks Ted.

llvm-svn: 167176

11 years agoResolve any bundle paths we are given when the specified executable is a bundle.
Greg Clayton [Wed, 31 Oct 2012 21:44:39 +0000 (21:44 +0000)]
Resolve any bundle paths we are given when the specified executable is a bundle.

llvm-svn: 167175

11 years agoLoopVectorize: Preserve NSW, NUW and IsExact flags.
Nadav Rotem [Wed, 31 Oct 2012 21:40:39 +0000 (21:40 +0000)]
LoopVectorize: Preserve NSW, NUW and IsExact flags.

llvm-svn: 167174

11 years ago[driver] Remove an extra space with the -iprefix option, so that
Chad Rosier [Wed, 31 Oct 2012 21:08:30 +0000 (21:08 +0000)]
[driver] Remove an extra space with the -iprefix option, so that
matching works correctly.
Part of rdar://12329974

llvm-svn: 167173

11 years ago[PCH] Remove the stat cache from the PCH file.
Argyrios Kyrtzidis [Wed, 31 Oct 2012 20:59:50 +0000 (20:59 +0000)]
[PCH] Remove the stat cache from the PCH file.

The stat cache became essentially useless ever since we started
validating all file entries in the PCH.
But the motivating reason for removing it now is that it also affected
correctness in this situation:

-You have a header without include guards (using "#pragma once" or #import)
-When creating the PCH:
  -The same header is referenced in an #include with different filename cases.
  -In the PCH, of course, we record only one file entry for the header file
  -But we cache in the PCH file the stat info for both filename cases

-Then the source files are updated and the header file is updated in a way that
 its size and modification time are the same but its inode changes

-When using the PCH:
  -We validate the headers, we check that header file and we create a file entry with its current inode
  -There's another #include with a filename with different case than the previously created file entry
  -In order to get its stat info we go through the cached stat info of the PCH and we receive the old inode
  -because of the different inodes, we think they are different files so we go ahead and include its contents.

Removing the stat cache will potentially break clients that are attempting to use the stat cache
as a way of avoiding having the actual input files available. If that use case is important, patches are welcome
to bring it back in a way that will actually work correctly (i.e., emit a PCH that is self-contained, coping with
literal strings, line/column computations, etc.).

This fixes rdar://5502805

llvm-svn: 167172

11 years agoMore fixes from MSVC warnings found by Carlo Kok.
Greg Clayton [Wed, 31 Oct 2012 20:56:43 +0000 (20:56 +0000)]
More fixes from MSVC warnings found by Carlo Kok.

llvm-svn: 167171

11 years agoFix a bug in the cost calculation of vector casts. Detect situations where bitcasts...
Nadav Rotem [Wed, 31 Oct 2012 20:52:26 +0000 (20:52 +0000)]
Fix a bug in the cost calculation of vector casts. Detect situations where bitcasts cost zero.

llvm-svn: 167170

11 years agoCarlo Kok was compiling with MSVC, caught some more issues.
Greg Clayton [Wed, 31 Oct 2012 20:51:31 +0000 (20:51 +0000)]
Carlo Kok was compiling with MSVC, caught some more issues.

llvm-svn: 167168

11 years agoCarlo Kok found an issue where default parameters were causing the wrong argument...
Greg Clayton [Wed, 31 Oct 2012 20:49:04 +0000 (20:49 +0000)]
Carlo Kok found an issue where default parameters were causing the wrong argument to be passed. I got rid of the default args so we don't run into this.

llvm-svn: 167167

11 years agoFix cl brokeness.
Michael J. Spencer [Wed, 31 Oct 2012 20:47:30 +0000 (20:47 +0000)]
Fix cl brokeness.

cl is not attempting to complete a templated class when used in this
context. The conversion forces this to happen.

Thanks to Richard Smith for figuring this out.

llvm-svn: 167166

11 years agoAdd missing include.
Michael J. Spencer [Wed, 31 Oct 2012 20:47:11 +0000 (20:47 +0000)]
Add missing include.

llvm-svn: 167165

11 years agoMark code, not data, as executable in lli RemoteTarget simulator.
Andrew Kaylor [Wed, 31 Oct 2012 20:37:14 +0000 (20:37 +0000)]
Mark code, not data, as executable in lli RemoteTarget simulator.

llvm-svn: 167164

11 years ago[clang tests] Added require ppc64-registered-target to Headers/altivec-header.c to...
Michael Gottesman [Wed, 31 Oct 2012 20:20:04 +0000 (20:20 +0000)]
[clang tests] Added require ppc64-registered-target to Headers/altivec-header.c to ensure it only runs on ppc64.

llvm-svn: 167162

11 years ago[driver] Remove an extra space with the -internal-externc-isystem option, so
Chad Rosier [Wed, 31 Oct 2012 19:28:55 +0000 (19:28 +0000)]
[driver] Remove an extra space with the -internal-externc-isystem option, so
that matching works correctly.
Part of rdar://12329974

llvm-svn: 167161

11 years agoPatch for issue found by Carlo Kok. Fixed a type issue where an ';' was incorrectly...
Greg Clayton [Wed, 31 Oct 2012 19:05:35 +0000 (19:05 +0000)]
Patch for issue found by Carlo Kok. Fixed a type issue where an ';' was incorrectly following an if statement. There actually isn't a need for the if statement, so it was removed.

llvm-svn: 167160

11 years agoARM AAPCS-VFP: fix tracking of allocated VFP registers.
Manman Ren [Wed, 31 Oct 2012 19:02:26 +0000 (19:02 +0000)]
ARM AAPCS-VFP: fix tracking of allocated VFP registers.

According to the spec, we can backfill VFP registers that were skipped due
to alignment constraints.

llvm-svn: 167159

11 years ago[driver] Remove the -ccc-host-triple alias. This has been replaced by the
Chad Rosier [Wed, 31 Oct 2012 18:59:38 +0000 (18:59 +0000)]
[driver] Remove the -ccc-host-triple alias.  This has been replaced by the
-target option.
rdar://10692880

llvm-svn: 167158

11 years agoRemove Triple::getArchTypeForDarwinArchName. I lives on the clang driver now.
Rafael Espindola [Wed, 31 Oct 2012 18:52:25 +0000 (18:52 +0000)]
Remove Triple::getArchTypeForDarwinArchName. I lives on the clang driver now.

llvm-svn: 167157

11 years agogetArchTypeForDarwinArchName is only used in the clang driver, copy it there.
Rafael Espindola [Wed, 31 Oct 2012 18:51:07 +0000 (18:51 +0000)]
getArchTypeForDarwinArchName is only used in the clang driver, copy it there.
I will remove it from llvm in the next commit.

llvm-svn: 167156

11 years agoFix for -ast-dump-filter
Alexander Kornienko [Wed, 31 Oct 2012 18:46:31 +0000 (18:46 +0000)]
Fix for -ast-dump-filter

Summary:
-ast-dump-filter implementation used to stop AST traversal after traversing a NULL Decl node.

Added test and fixed.

Reviewers: djasper, klimek, rsmith

Reviewed By: djasper

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D93

llvm-svn: 167155

11 years ago[mips] Set isAsCheapAsAMove flag on ADDiu and DADDiu, which enables
Akira Hatanaka [Wed, 31 Oct 2012 18:37:55 +0000 (18:37 +0000)]
[mips] Set isAsCheapAsAMove flag on ADDiu and DADDiu, which enables
re-materialization of immediate loads.

llvm-svn: 167153

11 years ago[driver] Completely rework how superfluous options are stripped out of the crash
Chad Rosier [Wed, 31 Oct 2012 18:31:33 +0000 (18:31 +0000)]
[driver] Completely rework how superfluous options are stripped out of the crash
diagnostics script.

This addresses the FIXME pertaining to quoted arguments.  We also delineate
between those flags that have an argument (e.g., -D macro, -MF file) and
those that do not (e.g., -M, -MM, -MG).  Finally, we add the -dwarf-debug-flags
to the list of flags to be removed.
rdar://12329974

llvm-svn: 167152

11 years agoAdd "static" to some functions in altivec.c where it was missing.
Ulrich Weigand [Wed, 31 Oct 2012 18:17:07 +0000 (18:17 +0000)]
Add "static" to some functions in altivec.c where it was missing.

llvm-svn: 167148

11 years agoMCJIT unit test: add calls to ensure that instruction caches are properly invalidated...
Amara Emerson [Wed, 31 Oct 2012 17:44:16 +0000 (17:44 +0000)]
MCJIT unit test: add calls to ensure that instruction caches are properly invalidated before code execution.

llvm-svn: 167146

11 years agoPort lli bug fix from r166920 to MCJIT unit test.
Amara Emerson [Wed, 31 Oct 2012 17:41:51 +0000 (17:41 +0000)]
Port lli bug fix from r166920 to MCJIT unit test.

llvm-svn: 167145

11 years agoCommit access test.
Amara Emerson [Wed, 31 Oct 2012 17:35:12 +0000 (17:35 +0000)]
Commit access test.

llvm-svn: 167144

11 years agoThis patch removes the XFAIL for powerpc for
Bill Schmidt [Wed, 31 Oct 2012 17:31:46 +0000 (17:31 +0000)]
This patch removes the XFAIL for powerpc for
test/CodeGenCXX/member-alignment.cpp.  The test succeeds for
powerpc64-unknown-linux-gnu.  If other flavors of powerpc are
shown by buildbots to still be broken, we can adjust the test
at that time.

llvm-svn: 167143

11 years agoIf skipping bodies is enabled outside code-completion, just skip the body directly
Argyrios Kyrtzidis [Wed, 31 Oct 2012 17:29:28 +0000 (17:29 +0000)]
If skipping bodies is enabled outside code-completion, just skip the body directly
without using tentative parsing.

llvm-svn: 167142

11 years agoDecouple code-completion for the SkipFunctionBodies frontend option and
Argyrios Kyrtzidis [Wed, 31 Oct 2012 17:29:22 +0000 (17:29 +0000)]
Decouple code-completion for the SkipFunctionBodies frontend option and
add a test to make sure code-completion skips bodies.

llvm-svn: 167141

11 years agoRemove stale documentation about tail duplicaton IR pass
Arnold Schwaighofer [Wed, 31 Oct 2012 17:25:31 +0000 (17:25 +0000)]
Remove stale documentation about tail duplicaton IR pass

We no longer have a tail duplication pass that runs on LLVM IR. It was removed
in 3.0.

llvm-svn: 167140

11 years agoTest case for r167039. Check that tail-call optimization is disabled for
Akira Hatanaka [Wed, 31 Oct 2012 17:25:23 +0000 (17:25 +0000)]
Test case for r167039. Check that tail-call optimization is disabled for
mips16.

llvm-svn: 167139

11 years ago[analyzer] Let ConstraintManager subclasses provide a more efficient checkNull.
Jordan Rose [Wed, 31 Oct 2012 16:44:55 +0000 (16:44 +0000)]
[analyzer] Let ConstraintManager subclasses provide a more efficient checkNull.

Previously, every call to a ConstraintManager's isNull would do a full
assumeDual to test feasibility. Now, ConstraintManagers can override
checkNull if they have a cheaper way to do the same thing.
RangeConstraintManager can do this in less than half the work.

<rdar://problem/12608209>

llvm-svn: 167138

11 years agoFix typo in CodeGenerator doc
Eli Bendersky [Wed, 31 Oct 2012 16:41:07 +0000 (16:41 +0000)]
Fix typo in CodeGenerator doc

llvm-svn: 167137

11 years agoLCSSA: Try to recover compile time regressions due to SCEV updates.
Benjamin Kramer [Wed, 31 Oct 2012 16:30:03 +0000 (16:30 +0000)]
LCSSA: Try to recover compile time regressions due to SCEV updates.

- Use value handle tricks to communicate use replacements instead of forgetLoop, this is a lot faster.
- Move the "big hammer" out of the main loop so it's not called for every instruction.

This should recover most (if not all) compile time regressions introduced by this code.

llvm-svn: 167136

11 years agoPut the threshold magic number in a variable.
Nadav Rotem [Wed, 31 Oct 2012 16:22:16 +0000 (16:22 +0000)]
Put the threshold magic number in a variable.

llvm-svn: 167134

11 years agoDisable all old-JIT unit tests on PowerPC.
Ulrich Weigand [Wed, 31 Oct 2012 16:18:02 +0000 (16:18 +0000)]
Disable all old-JIT unit tests on PowerPC.

These tests were all failing since the old JIT doesn't work
for PowerPC (any more), and there are no plans to attempt to
fix it again (instead, work focuses on MCJIT).

llvm-svn: 167133

11 years agoRemove fixme about unreachable cases from SwitchToLookupTable
Hans Wennborg [Wed, 31 Oct 2012 16:15:25 +0000 (16:15 +0000)]
Remove fixme about unreachable cases from SwitchToLookupTable

SimplifyCFG will have removed those cases for us.

llvm-svn: 167132

11 years agoRemove enum values since they are not used anymore.
Nadav Rotem [Wed, 31 Oct 2012 16:14:06 +0000 (16:14 +0000)]
Remove enum values since they are not used anymore.

llvm-svn: 167131

11 years agoAddress Duncan's comments on r167121.
Hans Wennborg [Wed, 31 Oct 2012 15:31:09 +0000 (15:31 +0000)]
Address Duncan's comments on r167121.

llvm-svn: 167130

11 years agoBBVectorize: Choose pair ordering to minimize shuffles
Hal Finkel [Wed, 31 Oct 2012 15:17:07 +0000 (15:17 +0000)]
BBVectorize: Choose pair ordering to minimize shuffles

BBVectorize would, except for loads and stores, always fuse instructions
so that the first instruction (in the current source order) would always
represent the low part of the input vectors and the second instruction
would always represent the high part. This lead to too many shuffles
being produced because sometimes the opposite order produces fewer of them.

With this change, BBVectorize tracks the kind of pair connections that form
the DAG of candidate pairs, and uses that information to reorder the pairs to
avoid excess shuffles. Using this information, a future commit will be able
to add VTTI-based shuffle costs to the pair selection procedure. Importantly,
the number of remaining shuffles can now be estimated during pair selection.

There are some trivial instruction reorderings in the test cases, and one
simple additional test where we certainly want to do a reordering to
avoid an unnecessary shuffle.

llvm-svn: 167122

11 years agoAddress Duncan's comments on r167115
Hans Wennborg [Wed, 31 Oct 2012 15:14:39 +0000 (15:14 +0000)]
Address Duncan's comments on r167115

 - Use 0 instead of NULL
 - Helper function for "dyn_cast, else lookup in the constant pool".

llvm-svn: 167121

11 years agoinstcombine: Migrate strto* optimizations
Meador Inge [Wed, 31 Oct 2012 14:58:26 +0000 (14:58 +0000)]
instcombine: Migrate strto* optimizations

This patch migrates the strto* optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167119

11 years agoFix if-else braces layout accordingly to the style guide.
Simon Atanasyan [Wed, 31 Oct 2012 14:39:28 +0000 (14:39 +0000)]
Fix if-else braces layout accordingly to the style guide.

llvm-svn: 167118

11 years agoFix false -> NULL conversion from r167115 spotted by Benjamin Kramer.
Hans Wennborg [Wed, 31 Oct 2012 14:36:48 +0000 (14:36 +0000)]
Fix false -> NULL conversion from r167115 spotted by Benjamin Kramer.

llvm-svn: 167117

11 years agoReplace some instances of UniqueVector with SetVector, which is slightly cheaper.
Benjamin Kramer [Wed, 31 Oct 2012 13:45:49 +0000 (13:45 +0000)]
Replace some instances of UniqueVector with SetVector, which is slightly cheaper.

No functionality change.

llvm-svn: 167116

11 years agoDo simple constant propagation in lookup table formation for switches
Hans Wennborg [Wed, 31 Oct 2012 13:42:45 +0000 (13:42 +0000)]
Do simple constant propagation in lookup table formation for switches

By propagating the value for the switch condition, LLVM can now build
lookup tables for code such as:

  switch (x) {
    case 1: return 5;
    case 2: return 42;
    case 3: case 4: case 5:
      return x - 123;
    default:
      return 123;
  }

Given that x is known for each case, "x - 123" becomes a constant for
cases 3, 4, and 5.

llvm-svn: 167115

11 years agoExtend -Bprefix functionality and make it closer to gcc. If the "prefix"
Simon Atanasyan [Wed, 31 Oct 2012 12:01:53 +0000 (12:01 +0000)]
Extend -Bprefix functionality and make it closer to gcc. If the "prefix"
is not a directory, Driver::GetProgramPath() routine does not try to append
the program name as a "path component" to it. It just joins the "prefix" with
the program name and checks the resulting path existence.

The patch reviewed by Rafael Espindola.

llvm-svn: 167114

11 years agoFix a couple of comment typos.
Benjamin Kramer [Wed, 31 Oct 2012 11:25:32 +0000 (11:25 +0000)]
Fix a couple of comment typos.

llvm-svn: 167113

11 years agoLCSSA: Add a workaround for another nasty SCEV cache invalidation issue.
Benjamin Kramer [Wed, 31 Oct 2012 10:01:29 +0000 (10:01 +0000)]
LCSSA: Add a workaround for another nasty SCEV cache invalidation issue.

I'm not entirely happy with this solution, but I don't see a smarter way currently.
Fixes PR14214.

llvm-svn: 167112

11 years agoAdd IRBuilderBase::getIntPtrTy.
Evgeniy Stepanov [Wed, 31 Oct 2012 09:50:01 +0000 (09:50 +0000)]
Add IRBuilderBase::getIntPtrTy.

llvm-svn: 167111

11 years agoDependenceAnalysis: Don't crash if there is no constant operand.
Benjamin Kramer [Wed, 31 Oct 2012 09:20:38 +0000 (09:20 +0000)]
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

11 years agoAdd support for ARM segment types PT_ARM_ARCHEXT, PT_ARM_EXIDX and PT_ARM_UNWIND.
James Molloy [Wed, 31 Oct 2012 09:10:56 +0000 (09:10 +0000)]
Add support for ARM segment types PT_ARM_ARCHEXT, PT_ARM_EXIDX and PT_ARM_UNWIND.

Patch by Pete Chou!

llvm-svn: 167109

11 years agoAdd support for Cortex-A15 host recognition.
James Molloy [Wed, 31 Oct 2012 09:07:37 +0000 (09:07 +0000)]
Add support for Cortex-A15 host recognition.

No testcase, as this is only testable on a C-A15 board.

llvm-svn: 167108

11 years agoImplement ADJCALLSTACKUP and ADJCALLSTACKDOWN
Reed Kotler [Wed, 31 Oct 2012 05:21:10 +0000 (05:21 +0000)]
Implement ADJCALLSTACKUP and ADJCALLSTACKDOWN

llvm-svn: 167107

11 years agoAdd scalar forms of FMA4 VFNMSUB/VFNMADD to folding tables. Patch from Cameron McInally.
Craig Topper [Wed, 31 Oct 2012 04:59:46 +0000 (04:59 +0000)]
Add scalar forms of FMA4 VFNMSUB/VFNMADD to folding tables. Patch from Cameron McInally.

llvm-svn: 167106

11 years agoinstcombine: Migrate strpbrk optimizations
Meador Inge [Wed, 31 Oct 2012 04:29:58 +0000 (04:29 +0000)]
instcombine: Migrate strpbrk optimizations

This patch migrates the strpbrk optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167105

11 years agoClean up redundant SP register maintained in X86 TLI
Michael Liao [Wed, 31 Oct 2012 04:14:09 +0000 (04:14 +0000)]
Clean up redundant SP register maintained in X86 TLI

llvm-svn: 167104

11 years agoinstcombine: Migrate strlen optimizations
Meador Inge [Wed, 31 Oct 2012 03:33:06 +0000 (03:33 +0000)]
instcombine: Migrate strlen optimizations

This patch migrates the strlen optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167103

11 years agoinstcombine: Migrate strncpy optimizations
Meador Inge [Wed, 31 Oct 2012 03:33:00 +0000 (03:33 +0000)]
instcombine: Migrate strncpy optimizations

This patch migrates the strncpy optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167102

11 years agoLoopVectorize: Do not vectorize loops with tiny constant trip counts.
Nadav Rotem [Wed, 31 Oct 2012 03:31:07 +0000 (03:31 +0000)]
LoopVectorize: Do not vectorize loops with tiny constant trip counts.

llvm-svn: 167101

11 years agoRemove empty directories.
Rafael Espindola [Wed, 31 Oct 2012 02:34:48 +0000 (02:34 +0000)]
Remove empty directories.

llvm-svn: 167100

11 years ago[analyzer] SimpleStreamChecker - remove evalAssume and other refinements
Anna Zaks [Wed, 31 Oct 2012 02:32:41 +0000 (02:32 +0000)]
[analyzer] SimpleStreamChecker - remove evalAssume and other refinements

llvm-svn: 167099

11 years agoRemove really old benchmark data.
Rafael Espindola [Wed, 31 Oct 2012 02:29:15 +0000 (02:29 +0000)]
Remove really old benchmark data.

llvm-svn: 167098

11 years agoRmoved a duplicate version of SetSelectedThreadByID
Sean Callanan [Wed, 31 Oct 2012 02:12:08 +0000 (02:12 +0000)]
Rmoved a duplicate version of SetSelectedThreadByID
that confused external clients.

<rdar://problem/12599528>

llvm-svn: 167097

11 years agoRemoved some spurious files from our Copy
Sean Callanan [Wed, 31 Oct 2012 02:03:31 +0000 (02:03 +0000)]
Removed some spurious files from our Copy
Headers build phase.

llvm-svn: 167096

11 years agoFixed a crash when we couldn't create a
Sean Callanan [Wed, 31 Oct 2012 02:01:58 +0000 (02:01 +0000)]
Fixed a crash when we couldn't create a
CXXMethodDecl but tried to manipulate it
anyway.

<rdar://problem/12601996>

llvm-svn: 167095

11 years agoFix the bit pattern for vst1 in EmulateInstructionARM::GetThumbOpcodeForInstruction
Jason Molenda [Wed, 31 Oct 2012 02:00:46 +0000 (02:00 +0000)]
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

11 years agoRemove the -ccc-no-clang option.
Rafael Espindola [Wed, 31 Oct 2012 01:21:20 +0000 (01:21 +0000)]
Remove the -ccc-no-clang option.

llvm-svn: 167093

11 years ago[analyzer]Don't invalidate const arguments when there is no
Anna Zaks [Wed, 31 Oct 2012 01:18:26 +0000 (01:18 +0000)]
[analyzer]Don't invalidate const arguments when there is no
IdentifierInfo.

Ee: C++ copy constructors.
llvm-svn: 167092

11 years agoAddress Jordan's review: comments, spaces.
Anna Zaks [Wed, 31 Oct 2012 01:18:22 +0000 (01:18 +0000)]
Address Jordan's review: comments, spaces.

llvm-svn: 167091

11 years agoThis patch addresses an ABI compatibility issue with empty aggregate
Bill Schmidt [Wed, 31 Oct 2012 01:15:05 +0000 (01:15 +0000)]
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

11 years agoadd test for r167063
Seth Cantrell [Wed, 31 Oct 2012 01:03:35 +0000 (01:03 +0000)]
add test for r167063

llvm-svn: 167089

11 years agoChange signature of function RAFast::spillAll to avoid conversion between
Akira Hatanaka [Wed, 31 Oct 2012 00:56:01 +0000 (00:56 +0000)]
Change signature of function RAFast::spillAll to avoid conversion between
type MachineInstr* and MachineBasicBlock::iterator.

llvm-svn: 167088

11 years agoxlc supports __attribute__((aligned(x))), use it.
Rafael Espindola [Wed, 31 Oct 2012 00:54:26 +0000 (00:54 +0000)]
xlc supports __attribute__((aligned(x))), use it.
Patch by Kai.

llvm-svn: 167087

11 years agoCheck that iterator I is not the end iterator.
Akira Hatanaka [Wed, 31 Oct 2012 00:50:52 +0000 (00:50 +0000)]
Check that iterator I is not the end iterator.

llvm-svn: 167086

11 years agoAdd extra declarations of hash_value needed to build llvm with xlc 12.1.
Rafael Espindola [Wed, 31 Oct 2012 00:46:18 +0000 (00:46 +0000)]
Add extra declarations of hash_value needed to build llvm with xlc 12.1.
Patch by Kai!

llvm-svn: 167085

11 years agoAdd support for loops that don't start with Zero.
Nadav Rotem [Wed, 31 Oct 2012 00:45:26 +0000 (00:45 +0000)]
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

11 years agoinstcombine: Migrate stpcpy optimizations
Meador Inge [Wed, 31 Oct 2012 00:20:56 +0000 (00:20 +0000)]
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

11 years agoinstcombine: Split out the __stpcpy_chk simplifications from StrCpyChkOpt
Meador Inge [Wed, 31 Oct 2012 00:20:51 +0000 (00:20 +0000)]
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

11 years ago<rdar://problem/12586188> Make ImportError a special case for "command script import...
Enrico Granata [Wed, 31 Oct 2012 00:01:26 +0000 (00:01 +0000)]
<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

11 years ago<rdar://problem/12602978>
Greg Clayton [Tue, 30 Oct 2012 23:57:32 +0000 (23:57 +0000)]
<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

11 years agoFixed build warnings.
Greg Clayton [Tue, 30 Oct 2012 23:56:14 +0000 (23:56 +0000)]
Fixed build warnings.

llvm-svn: 167065

11 years agoX86 SSE: update rsqrtss and rcpss to use two source operands and
Manman Ren [Tue, 30 Oct 2012 23:53:59 +0000 (23:53 +0000)]
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

11 years agoisLegalUTF8() was giving the wrong answer
Seth Cantrell [Tue, 30 Oct 2012 23:50:26 +0000 (23:50 +0000)]
isLegalUTF8() was giving the wrong answer

invalid but not caught by isLegalUTF8(): 0xED 0x75 0x84

llvm-svn: 167063

11 years agoRemove ccc-no-clang-cpp, which is also dead now.
Rafael Espindola [Tue, 30 Oct 2012 23:49:11 +0000 (23:49 +0000)]
Remove ccc-no-clang-cpp, which is also dead now.

llvm-svn: 167062

11 years agoMake blocks that capture their containing method's object pointer look like methods of
Jim Ingham [Tue, 30 Oct 2012 23:35:54 +0000 (23:35 +0000)]
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

11 years agoChange a couple of raw printf's to expression log output.
Jim Ingham [Tue, 30 Oct 2012 23:34:07 +0000 (23:34 +0000)]
Change a couple of raw printf's to expression log output.

llvm-svn: 167060

11 years agoHandle string encoding diagnostics when there are too many invalid ranges.
David Blaikie [Tue, 30 Oct 2012 23:22:22 +0000 (23:22 +0000)]
Handle string encoding diagnostics when there are too many invalid ranges.

llvm-svn: 167059

11 years agoARM AAPCS-VFP: fix handling of homogeneous aggreate.
Manman Ren [Tue, 30 Oct 2012 23:21:41 +0000 (23:21 +0000)]
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

11 years agoFix regression in old-style JIT.
Eli Friedman [Tue, 30 Oct 2012 22:21:55 +0000 (22:21 +0000)]
Fix regression in old-style JIT.

llvm-svn: 167057

11 years agoX86 MMX: optimize transfer from mmx to i32
Manman Ren [Tue, 30 Oct 2012 22:15:38 +0000 (22:15 +0000)]
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

11 years agoAdd documentation.
Nadav Rotem [Tue, 30 Oct 2012 22:06:26 +0000 (22:06 +0000)]
Add documentation.

llvm-svn: 167055