Commit Graph

136125 Commits

Author SHA1 Message Date
Joerg Sonnenberger ee1f31ebea Don't require exception handling for clang-tblgen.
llvm-svn: 166713
2012-10-25 20:34:00 +00:00
Joerg Sonnenberger 635debe85b Remove exception handling usage from tblgen.
Most places can use PrintFatalError as the unwinding mechanism was not
used for anything other than printing the error. The single exception
was CodeGenDAGPatterns.cpp, where intermediate errors during type
resolution were ignored to simplify incremental platform development.
This use is replaced by an error flag in TreePattern and bailout earlier
in various places if it is set. 

llvm-svn: 166712
2012-10-25 20:33:17 +00:00
Kaelyn Uhrain f1ecb7c62c Move the input files for test/PCH/badpch.c under test/PCH/Inputs/.
llvm-svn: 166711
2012-10-25 19:43:57 +00:00
Jakob Stoklund Olesen 977f41a1fa Also optimize large switch statements.
The isValueEqualityComparison() guard at the top of SimplifySwitch()
only applies to some of the possible transformations.

The newer transformations work just fine on large switches, and the
check on predecessor count is nonsensical.

llvm-svn: 166710
2012-10-25 18:51:15 +00:00
Douglas Gregor d814a05f6b When capturing 'this' in a lambda, make sure to update the set of
array-index starting values for the 'this' capture. Fixes
<rdar://problem/12426831>.

llvm-svn: 166709
2012-10-25 18:39:16 +00:00
Michael Liao 8cdb7ede80 Add 'const' qualifier on member functions not changing its fields.
llvm-svn: 166708
2012-10-25 18:35:04 +00:00
Dmitri Gribenko 1c1395e902 Comment to XML conversion: avoid memory allocation while pretty-printing the
declaration.

llvm-svn: 166707
2012-10-25 18:28:26 +00:00
Nadav Rotem 8b749b2364 Minor cleanups.
llvm-svn: 166706
2012-10-25 18:17:48 +00:00
Dmitri Gribenko 369ea3cb77 CommentDumper: reorder members and add a comment.
llvm-svn: 166705
2012-10-25 18:16:02 +00:00
Jim Ingham 5c48d5c536 Add text to the help to explain how to set user defined variables.
llvm-svn: 166704
2012-10-25 18:11:24 +00:00
Fariborz Jahanian bf7bf29166 Provide comment describing what buildBlockDescriptor does.
llvm-svn: 166703
2012-10-25 18:06:53 +00:00
Micah Villmow e337f71203 Update the release notes to note the change from TargetData to DataLayout.
llvm-svn: 166702
2012-10-25 18:06:47 +00:00
Greg Clayton ead45e0174 Allow operating system plug-ins to specify the address for registers so we don't have to create data up front.
llvm-svn: 166701
2012-10-25 17:56:31 +00:00
Sid Manning 823e8bb7be This patch changes the following:
* Use conventional naming for KindHandlers.
  * Add X86 relocation routines.
  * Use std::function instead of function pointers in _fixupHandler map.
  * Change _fixupHandler map from std::map to llvm::DenseMap.
  * Add simple testcase for x86 relocations.

llvm-svn: 166700
2012-10-25 17:53:04 +00:00
Michael Liao 8fe3a6bda4 Add test for ATOM ISA SSSE3
- Remove SSE4.1 feature in other ATOM-based test cases

llvm-svn: 166699
2012-10-25 17:50:05 +00:00
Chad Rosier 911c1f38b0 [ms-inline asm] Add error handling to the ParseIntelDotOperator() function.
llvm-svn: 166698
2012-10-25 17:37:43 +00:00
Jim Ingham 06933e2af0 Add section on creating convenience variables.
llvm-svn: 166697
2012-10-25 17:35:53 +00:00
David Blaikie dcbd160804 Remove unused member & unnecessary semicolon.
llvm-svn: 166694
2012-10-25 17:04:55 +00:00
Greg Clayton 89870cebcb Changed the V1 and V2 runtimes to be able to detect when the ISA hash table has changed, and auto update as needed.
llvm-svn: 166693
2012-10-25 16:54:22 +00:00
Joerg Sonnenberger 691a16b444 Don't throw exceptions in clang-tblgen by switching to PrintFatalError.
Add locations in a number of places, where they are available for free.

llvm-svn: 166691
2012-10-25 16:37:08 +00:00
Joerg Sonnenberger 356f797d66 In preparation for removing exception handling in tablegen, add
PrintFatalError, which combines PrintError with exit(1).

llvm-svn: 166690
2012-10-25 16:35:18 +00:00
Benjamin Kramer 71a3512d60 DependenceAnalysis: Push #includes down into the implementation.
llvm-svn: 166688
2012-10-25 16:15:22 +00:00
NAKAMURA Takumi 88e1b351d4 llvm/utils/TableGen/CMakeLists.txt: Update corresponding to r166685.
llvm-svn: 166686
2012-10-25 15:57:56 +00:00
Sebastian Pop 5c87daf2c8 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
2012-10-25 15:54:06 +00:00
Micah Villmow ea2fea2a60 Cleanup some clang code to use new type functions instead of using cast<>.
llvm-svn: 166684
2012-10-25 15:39:14 +00:00
NAKAMURA Takumi 920cff606b clang/test/CodeGenCXX/debug-info-thunk.cpp: Suppress it for now with XFAIL:*, due to failing on i686-*-*.
llvm-svn: 166683
2012-10-25 14:43:34 +00:00
Adhemerval Zanella 1be10dc732 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
2012-10-25 14:29:13 +00:00
David Tweed d8bb236e18 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
2012-10-25 13:56:30 +00:00
Bill Schmidt 6ed3b99f43 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
2012-10-25 13:38:09 +00:00
David Tweed 8f67653d26 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
2012-10-25 13:33:01 +00:00
Adhemerval Zanella 5fc11b3554 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
2012-10-25 13:13:48 +00:00
Adhemerval Zanella f2aceda854 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
2012-10-25 12:27:42 +00:00
Alexey Samsonov 9b502e512c 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
2012-10-25 10:18:50 +00:00
NAKAMURA Takumi 95fd41aeac unittests/ToolingTest.cpp: Suppress newFrontendActionFactory.InjectsEndOfSourceFileCallback on Win32 for now. Investigating.
llvm-svn: 166674
2012-10-25 09:38:41 +00:00
Manuel Klimek 8246d87db0 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
2012-10-25 08:49:11 +00:00
Chandler Carruth f6562ed2d3 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
2012-10-25 08:43:18 +00:00
Elena Demikhovsky e0e69a33a0 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
2012-10-25 08:38:42 +00:00
Chandler Carruth acdc5e812d Another fix for a build-bot reported API mismatch.
llvm-svn: 166668
2012-10-25 07:42:03 +00:00
Chandler Carruth 2435330ead Try to revive the Polly builders after this LLVM API change.
llvm-svn: 166666
2012-10-25 07:25:56 +00:00
Michael Liao c6696b04db Atom has SIMD instruction set extension up to SSSE3
llvm-svn: 166665
2012-10-25 07:06:48 +00:00
Michael Liao 6d810bd9b8 Clean up where SlotSize should be used instead of pointer size.
llvm-svn: 166664
2012-10-25 06:29:14 +00:00
Chandler Carruth 58d0556765 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
2012-10-25 04:37:07 +00:00
Richard Smith 4d3110af06 -fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.
llvm-svn: 166661
2012-10-25 02:14:12 +00:00
Richard Smith 2f0d7d564c -fcatch-undefined-behavior checking for appropriate vptr value: library side.
llvm-svn: 166660
2012-10-25 02:07:02 +00:00
Argyrios Kyrtzidis d53d0daab9 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
2012-10-25 01:51:45 +00:00
Sean Callanan ec8f1ef9db Updated LLDB's use of the DiagnosticsEngine to
reflect a change to the initializer.

llvm-svn: 166657
2012-10-25 01:00:25 +00:00
Douglas Gregor 79ae600e8f Update warning-flag test
llvm-svn: 166656
2012-10-25 00:34:38 +00:00
Bill Wendling d75987dde9 Revert r166647 to rethink the patch...
llvm-svn: 166655
2012-10-25 00:32:44 +00:00
Douglas Gregor 164df7debd 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
2012-10-25 00:30:23 +00:00
Douglas Gregor 471c1174c2 Fix computation of predefines buffer from the preprocessor-option
checking, and disable the old predefines-buffer-diff'ing code path.

llvm-svn: 166653
2012-10-25 00:25:27 +00:00