Commit Graph

78095 Commits

Author SHA1 Message Date
Anders Carlsson f3f67846c8 Handle virtual bases in ComputeBaseOffset.
llvm-svn: 96117
2010-02-13 20:41:15 +00:00
Daniel Dunbar 9ced542c8a Add newline.
llvm-svn: 96116
2010-02-13 20:24:39 +00:00
Anders Carlsson 6a6cbfc55f More work on covariant return types. We now handle non-virtual adjustments fine.
llvm-svn: 96114
2010-02-13 20:11:51 +00:00
Chris Lattner 3dc137d8ed pull a bunch of huge inline methods in the PatternCodeEmitter
class out of line.

llvm-svn: 96113
2010-02-13 20:06:50 +00:00
Chris Lattner ef538b52a3 add support for t Fedora 12 (February 2010), patch by
Dyachenko Dmitry.  Our system is "not so elegant" here.

llvm-svn: 96111
2010-02-13 19:18:26 +00:00
Chris Lattner 406cd61828 teach the encoder to handle pseudo instructions like FP_REG_KILL,
encoding them into nothing.

llvm-svn: 96110
2010-02-13 19:16:53 +00:00
Chris Lattner b8639bc2d1 remove dead code.
llvm-svn: 96109
2010-02-13 19:07:06 +00:00
Daniel Dunbar ae4b77d99d cindex/Python: Fix cindex-{dump,includes} examples to just pass all args
directly to Index, instead of requiring the input file to be first. This makes
the examples behave more like 'clang'.

For example,
  ddunbar@giles:tmp$ echo '#include <string>' | python ~/llvm/tools/clang/bindings/python/examples/cindex/cindex-includes.py -- -x c++ - | wc -l
     114
  ddunbar@giles:tmp$ echo '#include <stdio.h>' | python ~/llvm/tools/clang/bindings/python/examples/cindex/cindex-includes.py -- -x c - | wc -l
      10

llvm-svn: 96107
2010-02-13 18:33:28 +00:00
Daniel Dunbar 43813bf023 cindex/Python: Add TranslationUnit.get_includes, patch by Andrew Sutton!
llvm-svn: 96106
2010-02-13 18:33:18 +00:00
Daniel Dunbar 2037d4e4ea cindex/Python: Update for clang_getDiagnosticRange... API changes.
llvm-svn: 96105
2010-02-13 18:33:03 +00:00
Charles Davis 4ea31ab369 Emit the 'alignstack' LLVM function attribute when we encounter a function
marked 'force_align_arg_pointer'. Almost there; now all I need to do is finish
up the backend.

llvm-svn: 96100
2010-02-13 15:54:06 +00:00
Chandler Carruth a932bbca75 Fix think-o, attributes can't come *within* the type of the variable.
llvm-svn: 96099
2010-02-13 10:42:55 +00:00
Chandler Carruth 94eab4ad04 Silence unused variable warning in a build without assertions.
llvm-svn: 96098
2010-02-13 10:38:52 +00:00
Chandler Carruth 6b4756a224 Skip implicit instantiation of templated variables where a more recent
redeclaration provides an explicit instantiation or is invalid.

llvm-svn: 96097
2010-02-13 10:17:50 +00:00
Daniel Dunbar 8408c126c1 MCAssembler: Fix pcrel relocations. Oh and,
--
ddunbar@ozzy:tmp$ clang -m32 -integrated-as hello.c && ./a.out
hello world!
--

llvm-svn: 96096
2010-02-13 09:45:59 +00:00
Daniel Dunbar 1e2fad3de8 MC/Mach-O: Start emitting fixups/relocations for instructions.
llvm-svn: 96095
2010-02-13 09:29:02 +00:00
Daniel Dunbar 3374835b46 MCAssembler: Switch MCAsmFixup to storing MCFixupKind instead of just a size.
llvm-svn: 96094
2010-02-13 09:28:54 +00:00
Daniel Dunbar 97867a9cfc MCAssembler: Sink fixup list into MCDataFragment.
llvm-svn: 96093
2010-02-13 09:28:43 +00:00
Daniel Dunbar 056bc60336 MCAssembler: Switch MCFillFragment to only taking constant values. Symbolic expressions can always be emitted as data + fixups.
llvm-svn: 96092
2010-02-13 09:28:32 +00:00
Daniel Dunbar 1a1fbb50fc MC/Mach-O: Implement EmitValue using data fragments + fixups instead of fill fragment.
llvm-svn: 96091
2010-02-13 09:28:22 +00:00
Daniel Dunbar 8e53203154 MCAssembler: Start applying fixups in the data section.
llvm-svn: 96090
2010-02-13 09:28:15 +00:00
Daniel Dunbar bedf1d4a41 MCAssembler: Add assorted dump() methods.
llvm-svn: 96089
2010-02-13 09:28:03 +00:00
Daniel Dunbar 2610a34b15 X86: Move extended MCFixupKinds into X86FixupKinds.h
llvm-svn: 96088
2010-02-13 09:27:52 +00:00
Benjamin Kramer e047e11189 Remove dead {include, semicolon, variable}.
llvm-svn: 96087
2010-02-13 09:15:07 +00:00
Benjamin Kramer 02c673781d Use a different name for this iterator. MSVC and clang++ didn't like "I" in the same scope twice.
llvm-svn: 96086
2010-02-13 09:11:28 +00:00
Chandler Carruth dfe198b588 Silence a GCC warning about a possibly uninitialized variable. It's data flow
only flows so far it seems.

llvm-svn: 96085
2010-02-13 07:23:01 +00:00
Douglas Gregor 04922cbb46 Fix a fiendinshly fun little type-canonicalization bug, where we were
rebuilding a typename type terminating in a template-id (with
dependent template name, naturally) as a TypenameType when, because
its context could be fully resolved, we should have been building it
as a QualifiedNameType. Fixes PR6268.

llvm-svn: 96084
2010-02-13 06:05:33 +00:00
Chris Lattner 42c66b7270 Split some code out to a helper function (FindReusablePredBB)
and add a doxygen comment.

Cache the phi entry to avoid doing tons of 
PHINode::getBasicBlockIndex calls in the common case.

On my insane testcase from re2c, this speeds up CGP from
617.4s to 7.9s (78x).

llvm-svn: 96083
2010-02-13 05:35:08 +00:00
Douglas Gregor af050cb73a Permit the use of typedefs of class template specializations in
qualified declarator-ids. This patch is actually due to Cornelius;
fixes PR6179.

llvm-svn: 96082
2010-02-13 05:23:25 +00:00
Chris Lattner 5e7f705934 Speed up codegen prepare from 3.58s to 0.488s.
llvm-svn: 96081
2010-02-13 05:01:14 +00:00
Chris Lattner 72c4dce884 PHINode::getBasicBlockIndex is O(n) in the number of inputs
to a PHI, avoid it in the common case where the BB occurs
in the same index for multiple phis.  This speeds up CGP on
an insane testcase from 8.35 to 3.58s.

llvm-svn: 96080
2010-02-13 04:24:19 +00:00
Chris Lattner b0ebb65ab0 iterate over preds using PHI information when available instead of
using pred_begin/end.  It is much faster.

llvm-svn: 96079
2010-02-13 04:15:26 +00:00
Chris Lattner 96b8826542 speed up CGP a bit by scanning predecessors through phi operands
instead of with pred_begin/end.

llvm-svn: 96078
2010-02-13 04:04:42 +00:00
John McCall bb79b5f6f3 Raise the responsibility for passing -disable-llvm-verifier in NDEBUG builds
to the driver, and support it in CodeGenOptsToArgs().  Note that this changes
the default behavior of clang -cc1 to always run the verifier.

llvm-svn: 96077
2010-02-13 03:50:24 +00:00
Chris Lattner f83726f6ba add encoder support and tests for rdtscp
llvm-svn: 96076
2010-02-13 03:42:24 +00:00
Johnny Chen 52a6ab3ba7 Add SETEND and BXJ instructions for disassembly only.
llvm-svn: 96075
2010-02-13 02:51:09 +00:00
Sean Callanan 4d804d794f Added the rdtscp instruction to the x86 instruction
tables.

llvm-svn: 96073
2010-02-13 02:06:11 +00:00
Jakob Stoklund Olesen b659c76c77 Fix PR6283.
When coalescing with a physreg, remember to add imp-def and imp-kill when
dealing with sub-registers.

Also fix a related bug in VirtRegRewriter where substitutePhysReg may
reallocate the operand list on an instruction and invalidate the reg_iterator.
This can happen when a register is mentioned twice on the same instruction.

llvm-svn: 96072
2010-02-13 02:06:10 +00:00
Dan Gohman 5b18f039eb Fix a pruning heuristic which implicitly assumed that SmallPtrSet is
deterministically sorted.

llvm-svn: 96071
2010-02-13 02:06:02 +00:00
Anders Carlsson eee53d9c06 More work on return type adjustments in the new vtable builder.
llvm-svn: 96070
2010-02-13 02:02:03 +00:00
Evan Cheng 3b065cdb64 Teach MachineFrameInfo to track maximum alignment while stack objects are being
created. This ensures it's updated at all time. It means targets which perform
dynamic stack alignment would know whether it is required and whether frame
pointer register cannot be made available register allocation.
This is a fix for rdar://7625239. Sorry, I can't create a reasonably sized test
case.

llvm-svn: 96069
2010-02-13 01:56:41 +00:00
Ted Kremenek 1a6672a3d4 Enhance RegionStore::InvalidateRegions() to correctly invalidate bindings
by scanning through the values of LazyCompoundVals.

llvm-svn: 96067
2010-02-13 01:52:33 +00:00
Jakob Stoklund Olesen 492b8b42cd Enable the inlinehint attribute in the Inliner.
Functions explicitly marked inline will get an inlining threshold slightly
more aggressive than the default for -O3. This means than -O3 builds are
mostly unaffected while -Os builds will be a bit bigger and faster.

The difference depends entirely on how many 'inline's are sprinkled on the
source.

In the CINT2006 suite, only these tests are significantly affected under -Os:

               Size   Time
471.omnetpp   +1.63% -1.85%
473.astar     +4.01% -6.02%
483.xalancbmk +4.60%  0.00%

Note that 483.xalancbmk runs too quickly to give useful timing results.

llvm-svn: 96066
2010-02-13 01:51:53 +00:00
Sean Callanan 44232af55a Fixed encodings for invlpg, invept, and invvpid.
llvm-svn: 96065
2010-02-13 01:48:34 +00:00
Daniel Dunbar d0c6d361fe MC/AsmParser: Attempt to constant fold expressions up-front. This ensures we avoid fixups for obvious cases like '-(16)'.
llvm-svn: 96064
2010-02-13 01:28:07 +00:00
Johnny Chen b0208d2a06 Added a bunch of saturating add/subtract instructions for disassembly only.
llvm-svn: 96063
2010-02-13 01:21:01 +00:00
John McCall ef3057c419 Switch the standard DeclarationName comparator to be a tri-valued comparator.
Use that while fixing a nasty misuse of qsort in vtable codegen which, somehow,
has not actually caused a crash.

llvm-svn: 96062
2010-02-13 01:04:05 +00:00
Ted Kremenek 7950b78430 Pull logic for visiting value bindings in InvalidateRegionsWorker into a separate method.
No functionality change.

llvm-svn: 96060
2010-02-13 00:54:03 +00:00
Chris Lattner 509154e0f9 rip out the 'heinous' x86 MCCodeEmitter implementation.
We still have the templated X86 JIT emitter, *and* the
almost-copy in X86InstrInfo for getting instruction sizes.

llvm-svn: 96059
2010-02-13 00:49:29 +00:00
Chris Lattner 140caa7240 remove special cases for vmlaunch, vmresume, vmxoff, and swapgs
fix swapgs to be spelled right.

llvm-svn: 96058
2010-02-13 00:41:14 +00:00