Jason Molenda [Thu, 1 Nov 2012 02:02:59 +0000 (02:02 +0000)]
Fix an error message in debugserver so it doesn't print "Unable to
launch process (null)" because we changed argv while doing argument
parsing.
llvm-svn: 167202
Argyrios Kyrtzidis [Thu, 1 Nov 2012 02:01:34 +0000 (02:01 +0000)]
[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
the receiver of an ObjC message expression.
rdar://
12578643
llvm-svn: 167201
Owen Anderson [Thu, 1 Nov 2012 02:00:53 +0000 (02:00 +0000)]
Add a few more simple fast-math constant propagations and cancellations.
llvm-svn: 167200
NAKAMURA Takumi [Thu, 1 Nov 2012 01:47:02 +0000 (01:47 +0000)]
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h: Appease msvc.
llvm-svn: 167199
Jakob Stoklund Olesen [Thu, 1 Nov 2012 01:15:43 +0000 (01:15 +0000)]
Exploit the new identity composition in composeSubRegIndices().
The static compose() function in RegisterCoalescer was doing the exact
same thing.
llvm-svn: 167198
Jim Ingham [Thu, 1 Nov 2012 01:15:33 +0000 (01:15 +0000)]
There seems to be some odd corner case where we shut down the ProcessGDBRemote, but we haven't managed to shut down the async thread. That causes the ProcessGDBRemote::AsyncThread to crash when it wakes up. So I changed StartAsyncThread and StopAsyncThread to be callable multiple times (only the first one does anything) so that we can just shut it down unequivocally in the ProcessGDBRemote destructor.
<rdar://problem/
12602981>
llvm-svn: 167197
Jakub Staszak [Thu, 1 Nov 2012 01:10:43 +0000 (01:10 +0000)]
Don't insert and erase load instruction. Simply create (new) and delete it.
llvm-svn: 167196
Jordan Rose [Thu, 1 Nov 2012 01:05:39 +0000 (01:05 +0000)]
[analyzer] Optimize assumeDual by assuming constraint managers are consistent.
Specifically, if adding a constraint makes the current system infeasible,
assume the constraint is false, instead of attempting to add its negation.
In +Asserts builds we will still assert that at least one state is feasible.
Patch by Ryan Govostes!
llvm-svn: 167195
Jim Ingham [Thu, 1 Nov 2012 01:04:46 +0000 (01:04 +0000)]
Switch from using KERN_PROCARGS2 to get the path to the executed process to proc_pidpath. The former was flakey, and the whole point of libproc is to protect us from potential flakiness at that level...
<rdar://problem/
12594781>
llvm-svn: 167194
Argyrios Kyrtzidis [Thu, 1 Nov 2012 00:59:15 +0000 (00:59 +0000)]
[lit] For the "case-insensitive-filesystem" make sure to create the test temporary file
in the test output directory.
llvm-svn: 167193
Andrew Kaylor [Thu, 1 Nov 2012 00:46:04 +0000 (00:46 +0000)]
Streamlined memory manager hierarchy for MCJIT and RuntimeDyld.
Patch by Ashok Thirumurthi
llvm-svn: 167192
Michael J. Spencer [Thu, 1 Nov 2012 00:34:09 +0000 (00:34 +0000)]
[Support] Fix StrError on Windows to actually return the error string...
llvm-svn: 167191
Jakob Stoklund Olesen [Thu, 1 Nov 2012 00:32:10 +0000 (00:32 +0000)]
Generate a table-driven version of TRI::composeSubRegIndices().
Explicitly allow composition of null sub-register indices, and handle
that common case in an inlinable stub.
Use a compressed table implementation instead of the previous nested
switches which generated pretty bad code.
llvm-svn: 167190
Jordan Rose [Thu, 1 Nov 2012 00:25:15 +0000 (00:25 +0000)]
[analyzer] Fix typo in r167186.
llvm-svn: 167189
NAKAMURA Takumi [Thu, 1 Nov 2012 00:20:00 +0000 (00:20 +0000)]
clang/test/Index/code-completion-skip-bodies.cpp: Add XFAIL while investigating.
llvm-svn: 167188
Jordan Rose [Thu, 1 Nov 2012 00:18:41 +0000 (00:18 +0000)]
[analyzer] Minor cleanup in SimpleStreamChecker's class definition.
No functionality change.
llvm-svn: 167187
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
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
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
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
Greg Clayton [Wed, 31 Oct 2012 23:43:37 +0000 (23:43 +0000)]
More launchd style plists.
llvm-svn: 167182
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
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
Filipe Cabecinhas [Wed, 31 Oct 2012 23:02:00 +0000 (23:02 +0000)]
Use libxml2 on Mac OS X.
llvm-svn: 167179
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
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
Nadav Rotem [Wed, 31 Oct 2012 21:40:39 +0000 (21:40 +0000)]
LoopVectorize: Preserve NSW, NUW and IsExact flags.
llvm-svn: 167174
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
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
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
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
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
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
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
Michael J. Spencer [Wed, 31 Oct 2012 20:47:11 +0000 (20:47 +0000)]
Add missing include.
llvm-svn: 167165
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Amara Emerson [Wed, 31 Oct 2012 17:35:12 +0000 (17:35 +0000)]
Commit access test.
llvm-svn: 167144
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
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
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
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
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
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
Eli Bendersky [Wed, 31 Oct 2012 16:41:07 +0000 (16:41 +0000)]
Fix typo in CodeGenerator doc
llvm-svn: 167137
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
Nadav Rotem [Wed, 31 Oct 2012 16:22:16 +0000 (16:22 +0000)]
Put the threshold magic number in a variable.
llvm-svn: 167134
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
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
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
Hans Wennborg [Wed, 31 Oct 2012 15:31:09 +0000 (15:31 +0000)]
Address Duncan's comments on r167121.
llvm-svn: 167130
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
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
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
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
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
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
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
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
Benjamin Kramer [Wed, 31 Oct 2012 11:25:32 +0000 (11:25 +0000)]
Fix a couple of comment typos.
llvm-svn: 167113
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
Evgeniy Stepanov [Wed, 31 Oct 2012 09:50:01 +0000 (09:50 +0000)]
Add IRBuilderBase::getIntPtrTy.
llvm-svn: 167111
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
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
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
Reed Kotler [Wed, 31 Oct 2012 05:21:10 +0000 (05:21 +0000)]
Implement ADJCALLSTACKUP and ADJCALLSTACKDOWN
llvm-svn: 167107
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
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
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
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
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
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
Rafael Espindola [Wed, 31 Oct 2012 02:34:48 +0000 (02:34 +0000)]
Remove empty directories.
llvm-svn: 167100
Anna Zaks [Wed, 31 Oct 2012 02:32:41 +0000 (02:32 +0000)]
[analyzer] SimpleStreamChecker - remove evalAssume and other refinements
llvm-svn: 167099
Rafael Espindola [Wed, 31 Oct 2012 02:29:15 +0000 (02:29 +0000)]
Remove really old benchmark data.
llvm-svn: 167098
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
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
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
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
Rafael Espindola [Wed, 31 Oct 2012 01:21:20 +0000 (01:21 +0000)]
Remove the -ccc-no-clang option.
llvm-svn: 167093
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
Anna Zaks [Wed, 31 Oct 2012 01:18:22 +0000 (01:18 +0000)]
Address Jordan's review: comments, spaces.
llvm-svn: 167091
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
Seth Cantrell [Wed, 31 Oct 2012 01:03:35 +0000 (01:03 +0000)]
add test for r167063
llvm-svn: 167089
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
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
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
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