platform/upstream/llvm.git
11 years agoDependenceAnalysis: Push #includes down into the implementation.
Benjamin Kramer [Thu, 25 Oct 2012 16:15:22 +0000 (16:15 +0000)]
DependenceAnalysis: Push #includes down into the implementation.

llvm-svn: 166688

11 years agollvm/utils/TableGen/CMakeLists.txt: Update corresponding to r166685.
NAKAMURA Takumi [Thu, 25 Oct 2012 15:57:56 +0000 (15:57 +0000)]
llvm/utils/TableGen/CMakeLists.txt: Update corresponding to r166685.

llvm-svn: 166686

11 years agoadd TableGen support to create relationship maps between instructions
Sebastian Pop [Thu, 25 Oct 2012 15:54:06 +0000 (15:54 +0000)]
add TableGen support to create relationship maps between instructions

Relationship maps are represented as InstrMapping records which are parsed by
TableGen and the information is used to construct mapping tables to represent
appropriate relations between instructions. These tables are emitted into
XXXGenInstrInfo.inc file along with the functions to query them.

Patch by Jyotsna Verma <jverma@codeaurora.org>.

llvm-svn: 166685

11 years agoCleanup some clang code to use new type functions instead of using cast<>.
Micah Villmow [Thu, 25 Oct 2012 15:39:14 +0000 (15:39 +0000)]
Cleanup some clang code to use new type functions instead of using cast<>.

llvm-svn: 166684

11 years agoclang/test/CodeGenCXX/debug-info-thunk.cpp: Suppress it for now with XFAIL:*, due...
NAKAMURA Takumi [Thu, 25 Oct 2012 14:43:34 +0000 (14:43 +0000)]
clang/test/CodeGenCXX/debug-info-thunk.cpp: Suppress it for now with XFAIL:*, due to failing on i686-*-*.

llvm-svn: 166683

11 years agoThis patch fixes the MC object emission of 'nop' for external function calls
Adhemerval Zanella [Thu, 25 Oct 2012 14:29:13 +0000 (14:29 +0000)]
This patch fixes the MC object emission of 'nop' for external function calls
and also fixes the R_PPC64_TOC16 and R_PPC64_TOC16_DS relocation offset.
The 'nop' is needed so a restore TOC instruction (ld r2,40(r1)) can be placed
by the linker to correct restore the TOC of previous function.

Current code has two issues: it defines in PPCInstr64Bit.td file a LDinto_toc
and LDtoc_restore as a DSForm_1 with DS_RA=0 where it should be
DS=2 (the 8 bytes displacement of the TOC saving). It also wrongly emits a
MC intruction using an uint32_t value while the PPC::BL8_NOP_ELF
and PPC::BLA8_NOP_ELF are both uint64_t (because of the following 'nop').

This patch corrects the remaining ExecutionEngine using MCJIT:

ExecutionEngine/2002-12-16-ArgTest.ll
ExecutionEngine/2003-05-07-ArgumentTest.ll
ExecutionEngine/2005-12-02-TailCallBug.ll
ExecutionEngine/hello.ll
ExecutionEngine/hello2.ll
ExecutionEngine/test-call.ll

llvm-svn: 166682

11 years agoCorrect test inovocations to use %clang_cc1 rather than direct invocation (so that...
David Tweed [Thu, 25 Oct 2012 13:56:30 +0000 (13:56 +0000)]
Correct test inovocations to use %clang_cc1 rather than direct invocation (so that it can have additional options set when trying to debug issues causing regressions).

llvm-svn: 166681

11 years agoThis patch addresses a PPC64 ELF issue with passing parameters consisting of
Bill Schmidt [Thu, 25 Oct 2012 13:38:09 +0000 (13:38 +0000)]
This patch addresses a PPC64 ELF issue with passing parameters consisting of
structs having size 3, 5, 6, or 7.  Such a struct must be passed and received
as right-justified within its register or memory slot.  The problem is only
present for structs that are passed in registers.

Previously, as part of a patch handling all structs of size less than 8, I
added logic to rotate the incoming register so that the struct was left-
justified prior to storing the whole register.  This was incorrect because
the address of the parameter had already been adjusted earlier to point to
the right-adjusted value in the storage slot.  Essentially I had accidentally
accounted for the right-adjustment twice.

In this patch, I removed the incorrect logic and reorganized the code to make
the flow clearer.

The removal of the rotates changes the expected code generation, so test case
structsinregs.ll has been modified to reflect this.  I also added a new test
case, jaggedstructs.ll, to demonstrate that structs of these sizes can now
be properly received and passed.

I've built and tested the code on powerpc64-unknown-linux-gnu with no new
regressions.  I also ran the GCC compatibility test suite and verified that
earlier problems with these structs are now resolved, with no new regressions.

llvm-svn: 166680

11 years agoModify the targets to set appropriate calling convention defaults and C variables...
David Tweed [Thu, 25 Oct 2012 13:33:01 +0000 (13:33 +0000)]
Modify the targets to set appropriate calling convention defaults and C variables when using a gnueabihf or aapcs-vfp target.

Tested by me and Wei-Ren Chen.

llvm-svn: 166679

11 years agoPowerPC: Initial support for PowerPC64 MCJIT
Adhemerval Zanella [Thu, 25 Oct 2012 13:13:48 +0000 (13:13 +0000)]
PowerPC: Initial support for PowerPC64 MCJIT

This patch adds initial support for MCJIT for PPC64-elf-abi. The TOC
relocation and ODP handling is implemented.

It fixes the following ExecutionEngine testcases:

ExecutionEngine/2003-01-04-ArgumentBug.ll
ExecutionEngine/2003-01-04-LoopTest.ll
ExecutionEngine/2003-01-04-PhiTest.ll
ExecutionEngine/2003-01-09-SARTest.ll
ExecutionEngine/2003-01-10-FUCOM.ll
ExecutionEngine/2003-01-15-AlignmentTest.ll
ExecutionEngine/2003-05-11-PHIRegAllocBug.ll
ExecutionEngine/2003-06-04-bzip2-bug.ll
ExecutionEngine/2003-06-05-PHIBug.ll
ExecutionEngine/2003-08-15-AllocaAssertion.ll
ExecutionEngine/2003-08-21-EnvironmentTest.ll
ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll
ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
ExecutionEngine/simplesttest.ll
ExecutionEngine/simpletest.ll
ExecutionEngine/stubs.ll
ExecutionEngine/test-arith.ll
ExecutionEngine/test-branch.ll
ExecutionEngine/test-call-no-external-funcs.ll
ExecutionEngine/test-cast.ll
ExecutionEngine/test-common-symbols.ll
ExecutionEngine/test-constantexpr.ll
ExecutionEngine/test-fp-no-external-funcs.ll
ExecutionEngine/test-fp.ll
ExecutionEngine/test-global-init-nonzero.ll
ExecutionEngine/test-global.ll
ExecutionEngine/test-loadstore.ll
ExecutionEngine/test-local.ll
ExecutionEngine/test-logical.ll
ExecutionEngine/test-loop.ll
ExecutionEngine/test-phi.ll
ExecutionEngine/test-ret.ll
ExecutionEngine/test-return.ll
ExecutionEngine/test-setcond-fp.ll
ExecutionEngine/test-setcond-int.ll
ExecutionEngine/test-shift.ll

llvm-svn: 166678

11 years agoInitial TOC support for PowerPC64 object creation
Adhemerval Zanella [Thu, 25 Oct 2012 12:27:42 +0000 (12:27 +0000)]
Initial TOC support for PowerPC64 object creation

This patch adds initial PPC64 TOC MC object creation using the small mcmodel
(a single 64K TOC) adding the some TOC relocations (R_PPC64_TOC,
R_PPC64_TOC16, and R_PPC64_TOC16DS).

The addition of 'undefinedExplicitRelSym' hook on 'MCELFObjectTargetWriter'
is meant to avoid the creation of an unreferenced ".TOC." symbol (used in
the .odp creation) as well to set the R_PPC64_TOC relocation target as the
temporary ".TOC." symbol. On PPC64 ABI, the R_PPC64_TOC relocation should
not point to any symbol.

llvm-svn: 166677

11 years agoInitialize debug info for special cases of functions that lack declarations and are...
Alexey Samsonov [Thu, 25 Oct 2012 10:18:50 +0000 (10:18 +0000)]
Initialize debug info for special cases of functions that lack declarations and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942.

llvm-svn: 166676

11 years agounittests/ToolingTest.cpp: Suppress newFrontendActionFactory.InjectsEndOfSourceFileCa...
NAKAMURA Takumi [Thu, 25 Oct 2012 09:38:41 +0000 (09:38 +0000)]
unittests/ToolingTest.cpp: Suppress newFrontendActionFactory.InjectsEndOfSourceFileCallback on Win32 for now. Investigating.

llvm-svn: 166674

11 years agoAdds the possibility to inject a callback that's called after each translation unit...
Manuel Klimek [Thu, 25 Oct 2012 08:49:11 +0000 (08:49 +0000)]
Adds the possibility to inject a callback that's called after each translation unit is processed.

This is important when one wants to deduplicate results during one run over a translation unit by pointer identity of AST nodes.

llvm-svn: 166671

11 years agoAnother speculative commit to try to fix Polly's build. This is more delta than
Chandler Carruth [Thu, 25 Oct 2012 08:43:18 +0000 (08:43 +0000)]
Another speculative commit to try to fix Polly's build. This is more delta than
I like to make w/o being able to build, but I don't have the dependencies to
build and test polly. I'll revert if the build bots don't like it.

llvm-svn: 166670

11 years agoThe test avx-intel-ocl.ll failed. I can't reproduce on any of my machines. I added...
Elena Demikhovsky [Thu, 25 Oct 2012 08:38:42 +0000 (08:38 +0000)]
The test avx-intel-ocl.ll failed. I can't reproduce on any of my machines. I added -mcpu flag, may be it will fix the problem

llvm-svn: 166669

11 years agoAnother fix for a build-bot reported API mismatch.
Chandler Carruth [Thu, 25 Oct 2012 07:42:03 +0000 (07:42 +0000)]
Another fix for a build-bot reported API mismatch.

llvm-svn: 166668

11 years agoTry to revive the Polly builders after this LLVM API change.
Chandler Carruth [Thu, 25 Oct 2012 07:25:56 +0000 (07:25 +0000)]
Try to revive the Polly builders after this LLVM API change.

llvm-svn: 166666

11 years agoAtom has SIMD instruction set extension up to SSSE3
Michael Liao [Thu, 25 Oct 2012 07:06:48 +0000 (07:06 +0000)]
Atom has SIMD instruction set extension up to SSSE3

llvm-svn: 166665

11 years agoClean up where SlotSize should be used instead of pointer size.
Michael Liao [Thu, 25 Oct 2012 06:29:14 +0000 (06:29 +0000)]
Clean up where SlotSize should be used instead of pointer size.

llvm-svn: 166664

11 years agoTeach SROA how to split whole-alloca integer loads and stores into
Chandler Carruth [Thu, 25 Oct 2012 04:37:07 +0000 (04:37 +0000)]
Teach SROA how to split whole-alloca integer loads and stores into
smaller integer loads and stores.

The high-level motivation is that the frontend sometimes generates
a single whole-alloca integer load or store during ABI lowering of
splittable allocas. We need to be able to break this apart in order to
see the underlying elements and properly promote them to SSA values. The
hope is that this fixes some performance regressions on x86-32 with the
new SROA pass.

Unfortunately, this causes quite a bit of churn in the test cases, and
bloats some IR that comes out. When we see an alloca that consists soley
of bits and bytes being extracted and re-inserted, we now do some
splitting first, before building widened integer "bucket of bits"
representations. These are always well folded by instcombine however, so
this shouldn't actually result in missed opportunities.

If this splitting of all-integer allocas does cause problems (perhaps
due to smaller SSA values going into the RA), we could potentially go to
some extreme measures to only do this integer splitting trick when there
are non-integer component accesses of an alloca, but discovering this is
quite expensive: it adds yet another complete walk of the recursive use
tree of the alloca.

Either way, I will be watching build bots and LNT bots to see what
fallout there is here. If anyone gets x86-32 numbers before & after this
change, I would be very interested.

llvm-svn: 166662

11 years ago-fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.
Richard Smith [Thu, 25 Oct 2012 02:14:12 +0000 (02:14 +0000)]
-fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.

llvm-svn: 166661

11 years ago-fcatch-undefined-behavior checking for appropriate vptr value: library side.
Richard Smith [Thu, 25 Oct 2012 02:07:02 +0000 (02:07 +0000)]
-fcatch-undefined-behavior checking for appropriate vptr value: library side.

llvm-svn: 166660

11 years agoTake into account that there may be a BOM at the beginning of the file,
Argyrios Kyrtzidis [Thu, 25 Oct 2012 01:51:45 +0000 (01:51 +0000)]
Take into account that there may be a BOM at the beginning of the file,
when computing the size of the precompiled preamble.

llvm-svn: 166659

11 years agoUpdated LLDB's use of the DiagnosticsEngine to
Sean Callanan [Thu, 25 Oct 2012 01:00:25 +0000 (01:00 +0000)]
Updated LLDB's use of the DiagnosticsEngine to
reflect a change to the initializer.

llvm-svn: 166657

11 years agoUpdate warning-flag test
Douglas Gregor [Thu, 25 Oct 2012 00:34:38 +0000 (00:34 +0000)]
Update warning-flag test

llvm-svn: 166656

11 years agoRevert r166647 to rethink the patch...
Bill Wendling [Thu, 25 Oct 2012 00:32:44 +0000 (00:32 +0000)]
Revert r166647 to rethink the patch...

llvm-svn: 166655

11 years agoRemove the old predefines-buffer diffing code completely. It's been
Douglas Gregor [Thu, 25 Oct 2012 00:30:23 +0000 (00:30 +0000)]
Remove the old predefines-buffer diffing code completely. It's been
replaced by the more efficient, cleaner preprocessor-option version
that occurs earlier in PCH validation.

llvm-svn: 166654

11 years agoFix computation of predefines buffer from the preprocessor-option
Douglas Gregor [Thu, 25 Oct 2012 00:25:27 +0000 (00:25 +0000)]
Fix computation of predefines buffer from the preprocessor-option
checking, and disable the old predefines-buffer-diff'ing code path.

llvm-svn: 166653

11 years agoIdentify a kdp session that is connecting to an EFI monitor,
Jason Molenda [Thu, 25 Oct 2012 00:25:13 +0000 (00:25 +0000)]
Identify a kdp session that is connecting to an EFI monitor,
use a DynamicLoaderStatic dynamic loader for the session
instead of a kernel or user dynamic loader.

llvm-svn: 166652

11 years agoWhen we're devirtualizing a method call, make sure the method has the correct IR...
Eli Friedman [Thu, 25 Oct 2012 00:12:49 +0000 (00:12 +0000)]
When we're devirtualizing a method call, make sure the method has the correct IR type.

Reported in the thread "devirtualisation appears to crash clang on covariant functions on ARM" on cfe-dev.

llvm-svn: 166651

11 years agoASTUnit doesn't actually care about the predefines; don't record them.
Douglas Gregor [Thu, 25 Oct 2012 00:09:28 +0000 (00:09 +0000)]
ASTUnit doesn't actually care about the predefines; don't record them.

llvm-svn: 166650

11 years agoAdd support for additional reduction variables: AND, OR, XOR.
Nadav Rotem [Thu, 25 Oct 2012 00:08:41 +0000 (00:08 +0000)]
Add support for additional reduction variables: AND, OR, XOR.

Patch by Paul Redmond <paul.redmond@intel.com>.

llvm-svn: 166649

11 years agoThe the preprocessor option validator to compute suggested
Douglas Gregor [Thu, 25 Oct 2012 00:07:54 +0000 (00:07 +0000)]
The the preprocessor option validator to compute suggested
predefines. We're not quite ready to cut over to these suggested
predefines yet, however.

llvm-svn: 166648

11 years agoAdd some support for diagnosing possibly mismatched constraint, type size and
Bill Wendling [Thu, 25 Oct 2012 00:05:55 +0000 (00:05 +0000)]
Add some support for diagnosing possibly mismatched constraint, type size and
modifiers. (From an idea by Eric...)
<rdar://problem/12284092>

llvm-svn: 166647

11 years agoStop running the machine code verifier unconditionally.
Jakob Stoklund Olesen [Thu, 25 Oct 2012 00:05:39 +0000 (00:05 +0000)]
Stop running the machine code verifier unconditionally.

llvm-svn: 166646

11 years ago'constexpr' and 'friend' are both declaration specifiers. Teach the parser this,...
Richard Smith [Thu, 25 Oct 2012 00:00:53 +0000 (00:00 +0000)]
'constexpr' and 'friend' are both declaration specifiers. Teach the parser this, for better error recovery.

llvm-svn: 166645

11 years agoPR14171: Don't crash if we hit one of the paths where GetFullTypeForDeclarator
Richard Smith [Wed, 24 Oct 2012 23:51:56 +0000 (23:51 +0000)]
PR14171: Don't crash if we hit one of the paths where GetFullTypeForDeclarator
rebuilds a function type, and that function type has parens around its name.

llvm-svn: 166644

11 years agorevert accidental change
Nadav Rotem [Wed, 24 Oct 2012 23:48:57 +0000 (23:48 +0000)]
revert accidental change

llvm-svn: 166643

11 years agoImplement a basic cost model for vector and scalar instructions.
Nadav Rotem [Wed, 24 Oct 2012 23:47:38 +0000 (23:47 +0000)]
Implement a basic cost model for vector and scalar instructions.

llvm-svn: 166642

11 years agoTeach the PCH validator to check the preprocessor options, especially
Douglas Gregor [Wed, 24 Oct 2012 23:41:50 +0000 (23:41 +0000)]
Teach the PCH validator to check the preprocessor options, especially
the macros that are #define'd or #undef'd on the command line. This
checking happens much earlier than the current macro-definition
checking and is far cleaner, because it does a direct comparison
rather than a diff of the predefines buffers. Moreover, it allows us
to use the result of this check to skip over PCH files within a
directory that have non-matching -D's or -U's on the command
line. Finally, it improves the diagnostics a bit for mismatches,
fixing <rdar://problem/8612222>.

The old predefines-buffer diff'ing will go away in a subsequent commit.

llvm-svn: 166641

11 years agoTell llvm-mc we're using intel syntax, so we don't have to use directives.
Chad Rosier [Wed, 24 Oct 2012 23:34:38 +0000 (23:34 +0000)]
Tell llvm-mc we're using intel syntax, so we don't have to use directives.

llvm-svn: 166640

11 years agoAdd a bit of documentation on the annotated disassembly output.
Kevin Enderby [Wed, 24 Oct 2012 23:30:22 +0000 (23:30 +0000)]
Add a bit of documentation on the annotated disassembly output.

llvm-svn: 166639

11 years ago[ms-inline asm] Add back-end test case for r166632. Make sure we emit the
Chad Rosier [Wed, 24 Oct 2012 23:10:28 +0000 (23:10 +0000)]
[ms-inline asm] Add back-end test case for r166632.  Make sure we emit the
correct .s output as well as get the correct encoding by the integrated
assembler.

llvm-svn: 166638

11 years agoDon't try to install c-index-test with BUILD_CLANG_ONLY. rdar://12492703
Bob Wilson [Wed, 24 Oct 2012 22:56:32 +0000 (22:56 +0000)]
Don't try to install c-index-test with BUILD_CLANG_ONLY. rdar://12492703

llvm-svn: 166637

11 years agoc-index-test.c: Split a format string. [-Woverlength-strings]
NAKAMURA Takumi [Wed, 24 Oct 2012 22:52:04 +0000 (22:52 +0000)]
c-index-test.c: Split a format string. [-Woverlength-strings]

FIXME: They are still long strings without formatter in printf(3)!
llvm-svn: 166636

11 years agoAdded --framework and --executable arguments
Sean Callanan [Wed, 24 Oct 2012 22:45:39 +0000 (22:45 +0000)]
Added --framework and --executable arguments
to dotest.py so that the testsuite can run against
any LLDB.

<rdar://problem/12512268>

llvm-svn: 166635

11 years agoFix a compiler warning with an unused variable.
Micah Villmow [Wed, 24 Oct 2012 22:32:26 +0000 (22:32 +0000)]
Fix a compiler warning with an unused variable.

llvm-svn: 166634

11 years ago[ms-inline asm] Test case for r166632.
Chad Rosier [Wed, 24 Oct 2012 22:22:12 +0000 (22:22 +0000)]
[ms-inline asm] Test case for r166632.

llvm-svn: 166633

11 years ago[ms-inline asm] Add support for parsing the '.' operator. Given,
Chad Rosier [Wed, 24 Oct 2012 22:21:50 +0000 (22:21 +0000)]
[ms-inline asm] Add support for parsing the '.' operator.  Given,

[register].field

The operator returns the value at the location pointed to by register plus the
offset of field within its structure or union.  This patch only handles
immediate fields (i.e., [eax].4).  The original displacement has to be a
MCConstantExpr as well.
Part of rdar://12470415 and rdar://12470514

llvm-svn: 166632

11 years agoFixing the test case for rdar://12481949 to do the right thing with our new rules...
Enrico Granata [Wed, 24 Oct 2012 22:15:04 +0000 (22:15 +0000)]
Fixing the test case for rdar://12481949 to do the right thing with our new rules for sign-extension in GetValueAsUnsigned()

llvm-svn: 166631

11 years agoTidy up. No functional change intended.
Chad Rosier [Wed, 24 Oct 2012 22:13:37 +0000 (22:13 +0000)]
Tidy up.  No functional change intended.

llvm-svn: 166630

11 years agoDon't use stack unwinding to provide the location information for
Joerg Sonnenberger [Wed, 24 Oct 2012 22:03:59 +0000 (22:03 +0000)]
Don't use stack unwinding to provide the location information for
SetTheory, but pass down the location explicitly.

llvm-svn: 166629

11 years agoAnd one more logging message goes away
Enrico Granata [Wed, 24 Oct 2012 21:54:04 +0000 (21:54 +0000)]
And one more logging message goes away

llvm-svn: 166628

11 years agoReverting unwanted changes to the test suite
Enrico Granata [Wed, 24 Oct 2012 21:44:48 +0000 (21:44 +0000)]
Reverting unwanted changes to the test suite

llvm-svn: 166627

11 years agoReverting the changes to Scalar since this class needs to follow C rules for type...
Enrico Granata [Wed, 24 Oct 2012 21:42:49 +0000 (21:42 +0000)]
Reverting the changes to Scalar since this class needs to follow C rules for type promotion

llvm-svn: 166626

11 years agoFix false positive in -Wunused-variable when a ctor call make involve cleanups.
David Blaikie [Wed, 24 Oct 2012 21:29:06 +0000 (21:29 +0000)]
Fix false positive in -Wunused-variable when a ctor call make involve cleanups.

llvm-svn: 166625

11 years agoUpdate GVN to support vectors of pointers.
Hal Finkel [Wed, 24 Oct 2012 21:22:30 +0000 (21:22 +0000)]
Update GVN to support vectors of pointers.

GVN will now generate ptrtoint instructions for vectors of pointers.
Fixes PR14166.

llvm-svn: 166624

11 years agoMake LegalizeKind public so that we can use it outside of TargetLowering.
Nadav Rotem [Wed, 24 Oct 2012 20:59:17 +0000 (20:59 +0000)]
Make LegalizeKind public so that we can use it outside of TargetLowering.

llvm-svn: 166623

11 years agowhitespace
Nadav Rotem [Wed, 24 Oct 2012 20:58:40 +0000 (20:58 +0000)]
whitespace

llvm-svn: 166622

11 years agoDocument the -force-vector-width flag.
Nadav Rotem [Wed, 24 Oct 2012 20:47:55 +0000 (20:47 +0000)]
Document the -force-vector-width flag.

llvm-svn: 166621

11 years agoLoopVectorizer: Add a basic cost model which uses the VTTI interface.
Nadav Rotem [Wed, 24 Oct 2012 20:36:32 +0000 (20:36 +0000)]
LoopVectorizer: Add a basic cost model which uses the VTTI interface.

llvm-svn: 166620

11 years agoUpdate regression tests for r166617.
Eli Friedman [Wed, 24 Oct 2012 20:28:18 +0000 (20:28 +0000)]
Update regression tests for r166617.

llvm-svn: 166619

11 years agoReimplementing SBValue/ValueObject.GetValueAsUnsigned() in terms of appropriate calls...
Enrico Granata [Wed, 24 Oct 2012 20:24:39 +0000 (20:24 +0000)]
Reimplementing SBValue/ValueObject.GetValueAsUnsigned() in terms of appropriate calls in Scalar - Making sure Scalar does the right thing when casting signed values to unsigned ones.

llvm-svn: 166618

11 years agoDon't print scope qualifiers for references to a type defined locally in a function...
Eli Friedman [Wed, 24 Oct 2012 20:21:25 +0000 (20:21 +0000)]
Don't print scope qualifiers for references to a type defined locally in a function.  Patch by Grzegorz Jablonski.

llvm-svn: 166617

11 years agoAdd an additional test for namespaces and -Wmissing-variable-declarations. Move...
Eli Friedman [Wed, 24 Oct 2012 20:14:09 +0000 (20:14 +0000)]
Add an additional test for namespaces and -Wmissing-variable-declarations.  Move C++ test into SemaCXX.

llvm-svn: 166616

11 years ago(De-)serialize the preprocessor options, including macros defined,
Douglas Gregor [Wed, 24 Oct 2012 20:05:57 +0000 (20:05 +0000)]
(De-)serialize the preprocessor options, including macros defined,
-include'd files, etc.

llvm-svn: 166614

11 years agoFix a miscompilation caused by a typo. When turning a adde with negative value
Evan Cheng [Wed, 24 Oct 2012 19:53:01 +0000 (19:53 +0000)]
Fix a miscompilation caused by a typo. When turning a adde with negative value
into a sbc with a positive number, the immediate should be complemented, not
negated. Also added a missing pattern for ARM codegen.

rdar://12559385

llvm-svn: 166613

11 years agogetSmallConstantTripMultiple should never return zero.
Hal Finkel [Wed, 24 Oct 2012 19:46:44 +0000 (19:46 +0000)]
getSmallConstantTripMultiple should never return zero.

When the trip count is -1, getSmallConstantTripMultiple could return zero,
and this would cause runtime loop unrolling to assert. Instead of returning
zero, one is now returned (consistent with the existing overflow cases).
Fixes PR14167.

llvm-svn: 166612

11 years agoMake ~Operator() protected so subclasses can inherit it and not have
Kaelyn Uhrain [Wed, 24 Oct 2012 19:17:42 +0000 (19:17 +0000)]
Make ~Operator() protected so subclasses can inherit it and not have
a bunch of errors for all the Operator subclasses such as:

include/llvm/Operator.h:76:7: error: deleted function 'virtual llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()'
include/llvm/Operator.h:43:3: error: overriding non-deleted function 'virtual llvm::Operator::~Operator()'
include/llvm/Operator.h:76:7: error: 'virtual llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()' is implicitly deleted because the default definition would be ill-formed:
include/llvm/Operator.h:43:3: error: 'virtual llvm::Operator::~Operator()' is private
include/llvm/Operator.h:76:7: error: within this context

llvm-svn: 166611

11 years agoChanging the NSDate data formatter to use GetData().uint64[] instead of relying on...
Enrico Granata [Wed, 24 Oct 2012 19:05:32 +0000 (19:05 +0000)]
Changing the NSDate data formatter to use GetData().uint64[] instead of relying on SBValue.GetValueAsUnsigned() to reinterpret a double as a uint64_t

llvm-svn: 166610

11 years agoImprove DenseMap checks for power of 2 growth. Thanks for the tip Jakob
Pete Cooper [Wed, 24 Oct 2012 18:50:44 +0000 (18:50 +0000)]
Improve DenseMap checks for power of 2 growth.  Thanks for the tip Jakob

llvm-svn: 166609

11 years agoAdded process and thread logging the python OperatingSystem plug-in.
Greg Clayton [Wed, 24 Oct 2012 18:39:14 +0000 (18:39 +0000)]
Added process and thread logging the python OperatingSystem plug-in.

llvm-svn: 166608

11 years agoAdd some cleanup to the DataLayout changes requested by Chandler.
Micah Villmow [Wed, 24 Oct 2012 18:36:13 +0000 (18:36 +0000)]
Add some cleanup to the DataLayout changes requested by Chandler.

llvm-svn: 166607

11 years agoAdd a test showing that nodebug is accepted in methods too. Patch by
Rafael Espindola [Wed, 24 Oct 2012 18:34:26 +0000 (18:34 +0000)]
Add a test showing that nodebug is accepted in methods too. Patch by
Paul Robinson.

llvm-svn: 166606

11 years ago[libclang] Add "-index-file-full" option that recursively indexes any imported
Argyrios Kyrtzidis [Wed, 24 Oct 2012 18:29:15 +0000 (18:29 +0000)]
[libclang] Add "-index-file-full" option that recursively indexes any imported
modules/PCH files.

llvm-svn: 166605

11 years agoPatch from Ashok Thirumurthi that enabled FPU registers for POSIX x86_64.
Greg Clayton [Wed, 24 Oct 2012 18:24:14 +0000 (18:24 +0000)]
Patch from Ashok Thirumurthi that enabled FPU registers for POSIX x86_64.

llvm-svn: 166604

11 years ago<rdar://problem/12481949> Fixing SBValue.GetValueAsSigned() to do the right thing...
Enrico Granata [Wed, 24 Oct 2012 18:14:21 +0000 (18:14 +0000)]
<rdar://problem/12481949> Fixing SBValue.GetValueAsSigned() to do the right thing when dealing with a 32-bit negative value

llvm-svn: 166603

11 years agoOpt does not need to initialize the Asm printer/parser
Nadav Rotem [Wed, 24 Oct 2012 17:55:53 +0000 (17:55 +0000)]
Opt does not need to initialize the Asm printer/parser

llvm-svn: 166602

11 years agoExplicitly specify C++98 when building the C++ precompiled header for this test,...
Douglas Gregor [Wed, 24 Oct 2012 17:49:01 +0000 (17:49 +0000)]
Explicitly specify C++98 when building the C++ precompiled header for this test, so that the test will work on Windows.

llvm-svn: 166601

11 years ago[ms-inline asm] Add test cases for r166451.
Chad Rosier [Wed, 24 Oct 2012 17:48:01 +0000 (17:48 +0000)]
[ms-inline asm] Add test cases for r166451.

llvm-svn: 166600

11 years agoTeach the preprocessor to hold onto the preprocessor options.
Douglas Gregor [Wed, 24 Oct 2012 17:46:57 +0000 (17:46 +0000)]
Teach the preprocessor to hold onto the preprocessor options.

llvm-svn: 166599

11 years agoCleanup some variable names to indicate auto pointers and also manager the llvm:...
Greg Clayton [Wed, 24 Oct 2012 17:37:53 +0000 (17:37 +0000)]
Cleanup some variable names to indicate auto pointers and also manager the llvm::Module memory more correctly.

llvm-svn: 166598

11 years agoDelete the empty directory that was accidently added in 166578.
Micah Villmow [Wed, 24 Oct 2012 17:27:47 +0000 (17:27 +0000)]
Delete the empty directory that was accidently added in 166578.

llvm-svn: 166597

11 years agoBack out r166591, not sure why this made it through since I cancelled the command...
Micah Villmow [Wed, 24 Oct 2012 17:25:11 +0000 (17:25 +0000)]
Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this!

llvm-svn: 166596

11 years agoOpt needs to initialize the different targets.
Nadav Rotem [Wed, 24 Oct 2012 17:23:50 +0000 (17:23 +0000)]
Opt needs to initialize the different targets.

llvm-svn: 166595

11 years ago[ms-inline asm] Add test cases for r166592. The test cases only works if the
Chad Rosier [Wed, 24 Oct 2012 17:23:06 +0000 (17:23 +0000)]
[ms-inline asm] Add test cases for r166592. The test cases only works if the
source operand is a register.

llvm-svn: 166594

11 years agoImplement a basic VectorTargetTransformInfo interface to be used by the loop and...
Nadav Rotem [Wed, 24 Oct 2012 17:22:41 +0000 (17:22 +0000)]
Implement a basic VectorTargetTransformInfo interface to be used by the loop and bb vectorizers for modeling the cost of instructions.

llvm-svn: 166593

11 years ago[ms-inline asm] Create a register operand, rather than a memory operand when we
Chad Rosier [Wed, 24 Oct 2012 17:22:29 +0000 (17:22 +0000)]
[ms-inline asm] Create a register operand, rather than a memory operand when we
see the offsetof operator.  Previously, we were matching something like MOVrm
in the front-end and later matching MOVrr in the back-end.  This change makes
things more consistent.  It also fixes cases where we can't match against a
memory operand as the source (test cases coming).
Part of rdar://12470317

llvm-svn: 166592

11 years agoDelete a directory that wasn't supposed to be checked in yet.
Micah Villmow [Wed, 24 Oct 2012 17:20:04 +0000 (17:20 +0000)]
Delete a directory that wasn't supposed to be checked in yet.

llvm-svn: 166591

11 years agoMove PreprocessorOptions into the Lex library, and make it intrusively
Douglas Gregor [Wed, 24 Oct 2012 17:01:35 +0000 (17:01 +0000)]
Move PreprocessorOptions into the Lex library, and make it intrusively
reference-counted.

llvm-svn: 166587

11 years ago(De-)serialize header search options.
Douglas Gregor [Wed, 24 Oct 2012 16:50:34 +0000 (16:50 +0000)]
(De-)serialize header search options.

llvm-svn: 166586

11 years agoUpdate unit tests for HeaderSearch change
Douglas Gregor [Wed, 24 Oct 2012 16:24:38 +0000 (16:24 +0000)]
Update unit tests for HeaderSearch change

llvm-svn: 166584

11 years agoMove HeaderSearchOptions into the Lex library, make it intrusively
Douglas Gregor [Wed, 24 Oct 2012 16:19:39 +0000 (16:19 +0000)]
Move HeaderSearchOptions into the Lex library, make it intrusively
reference-counted, and hold a reference to it in HeaderSearch.

llvm-svn: 166583

11 years agoUndef SEMANTIC_VALUE_DIAGOPT appropriately
Douglas Gregor [Wed, 24 Oct 2012 15:53:39 +0000 (15:53 +0000)]
Undef SEMANTIC_VALUE_DIAGOPT appropriately

llvm-svn: 166579

11 years agoAdd in support for getIntPtrType to get the pointer type based on the address space.
Micah Villmow [Wed, 24 Oct 2012 15:52:52 +0000 (15:52 +0000)]
Add in support for getIntPtrType to get the pointer type based on the address space.
This checkin also adds in some tests that utilize these paths and updates some of the
clients.

llvm-svn: 166578

11 years ago(De-)serialize the file system options.
Douglas Gregor [Wed, 24 Oct 2012 15:49:58 +0000 (15:49 +0000)]
(De-)serialize the file system options.

llvm-svn: 166577

11 years agoSerialize DiagnosticOptions to the AST file.
Douglas Gregor [Wed, 24 Oct 2012 15:17:15 +0000 (15:17 +0000)]
Serialize DiagnosticOptions to the AST file.

llvm-svn: 166572

11 years agoRemoved an extra blank line.
Mahesha S [Wed, 24 Oct 2012 15:12:40 +0000 (15:12 +0000)]
Removed an extra blank line.

llvm-svn: 166571

11 years agoAdds the possibility to run ASTMatchFinder over arbitrary AST nodes.
Manuel Klimek [Wed, 24 Oct 2012 14:47:44 +0000 (14:47 +0000)]
Adds the possibility to run ASTMatchFinder over arbitrary AST nodes.

llvm-svn: 166567