Commit Graph

122336 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 8a450cb2fa Enable register mask operands for x86 calls.
Call instructions no longer have a list of 43 call-clobbered registers.
Instead, they get a single register mask operand with a bit vector of
call-preserved registers.

This saves a lot of memory, 42 x 32 bytes = 1344 bytes per call
instruction, and it speeds up building call instructions because those
43 imp-def operands no longer need to be added to use-def lists. (And
removed and shifted and re-added for every explicit call operand).

Passes like LiveVariables, LiveIntervals, RAGreedy, PEI, and
BranchFolding are significantly faster because they can deal with call
clobbers in bulk.

Overall, clang -O2 is between 0% and 8% faster, uniformly distributed
depending on call density in the compiled code.  Debug builds using
clang -O0 are 0% - 3% faster.

I have verified that this patch doesn't change the assembly generated
for the LLVM nightly test suite when building with -disable-copyprop
and -disable-branch-fold.

Branch folding behaves slightly differently in a few cases because call
instructions have different hash values now.

Copy propagation flushes its data structures when it crosses a register
mask operand. This causes it to leave a few dead copies behind, on the
order of 20 instruction across the entire nightly test suite, including
SPEC. Fixing this properly would require the pass to use different data
structures.

llvm-svn: 150638
2012-02-16 00:02:50 +00:00
Eric Christopher 9a89705d03 Revert "Add a completed/incomplete type difference. This allows us to have"
This reverts commit 9a68d4584afcd0853b930bd80235b58736e785b4.

llvm-svn: 150637
2012-02-15 23:51:20 +00:00
Bill Wendling b028143119 Remove extraneous tests.
llvm-svn: 150636
2012-02-15 23:44:05 +00:00
Bill Wendling 6a26ab7f99 Add a test for generating Objective-C metadata from module flags.
llvm-svn: 150635
2012-02-15 23:43:37 +00:00
Jakob Stoklund Olesen e9e30d083c Handle register masks in branch folding.
Don't attempt to move instructions with regmask operands. They are most
likely calls anyway.

llvm-svn: 150634
2012-02-15 23:42:54 +00:00
Andrew Trick 20349b88a6 Fix library visibility problems with VLIWPacketizer.
The existing framework for postra scheduling is library local. We want to keep it that way. Soon we will have a more general MachineScheduler interface. At that time, various bits will be exposed to targets. In the meantime, the VLIWPacketizer wants to use ScheduleDAGInstrs directly, so it needs to wrapped in a PIMPL to avoid exposing it to the target interface.

llvm-svn: 150633
2012-02-15 23:34:15 +00:00
Bill Wendling 399eae61e9 Use the enum instead of 'unsigned'.
llvm-svn: 150632
2012-02-15 23:27:50 +00:00
Eric Christopher 7381907e65 Add a completed/incomplete type difference. This allows us to have
partial types for contexts and forward decls while allowing us to
complete types later on for debug purposes.

This piggy-backs on the metadata replacement and rauw changes
for temporary nodes and takes advantage of the incremental
support I added in earlier. This allows us to, if we decide,
to limit adding methods and variables to structures in order
to limit the amount of debug information output into a .o file.

The caching is a bit complicated though so any thoughts on
untangling that are welcome.

llvm-svn: 150631
2012-02-15 23:25:18 +00:00
Lang Hames 923d199a67 Make LiveIntervals::handleMove() bundle aware.
llvm-svn: 150630
2012-02-15 23:21:33 +00:00
Kaelyn Uhrain 618f97ca21 Silence a valgrind warning, and remove an unused var.
llvm-svn: 150629
2012-02-15 22:59:03 +00:00
Bill Wendling a0009ee85a Use 'getDataNoRel' for the section kind.
llvm-svn: 150628
2012-02-15 22:47:53 +00:00
Lang Hames f15502f2e5 Fix assertion condition.
llvm-svn: 150627
2012-02-15 22:45:51 +00:00
Bill Wendling 0b73456cc5 Add a test for the Objective-C garbage collection metadata stuff.
llvm-svn: 150626
2012-02-15 22:44:10 +00:00
Richard Smith ebeed41587 Support GCC's bug^Wextension allowing class array members to be initalized by a
parenthesized braced-init-list in the base/member initialization list.

llvm-svn: 150625
2012-02-15 22:38:09 +00:00
Bill Wendling 734909a078 Modify the code that emits the module flags to use the new module flags accessor
method. This allows the target lowering code to not have to deal with MDNodes.

Also, avoid leaking memory like a sieve by not creating a global variable for
the image info section, but just emitting the code directly.

llvm-svn: 150624
2012-02-15 22:36:15 +00:00
Bill Wendling 0294932a43 Add a module flags accessor method which returns the flags in a vector.
llvm-svn: 150623
2012-02-15 22:34:20 +00:00
Kaelyn Uhrain 5986c3e90a Improve typo correction involving nested name specifiers.
Snooping in other namespaces when the identifier being corrected is
already qualified (i.e. a valid CXXScopeSpec is passed to CorrectTypo)
and ranking synthesized namespace qualifiers relative to the existing
qualifier is now performed. Support for disambiguating the string
representation of synthesized namespace qualifers has also been added
(the change to test/Parser/cxx-using-directive.cpp is an example of an
ambiguous relative qualifier).

llvm-svn: 150622
2012-02-15 22:14:18 +00:00
Kaelyn Uhrain 7a9ccf4c09 Add function for computing the edit distance of two arrays.
Accomplished by moving the body of StringRef::edit_distance into
a separate function that accepts two ArrayRefs, and making
StringRef::edit_distance a wrapper around the new function.

llvm-svn: 150621
2012-02-15 22:13:07 +00:00
Douglas Gregor 33e863cfc8 Lambda closure types have a conversion function to a block pointer
with the same parameter types and return type as the function call
operator. This is the real answer to

  http://stackoverflow.com/questions/4148242/is-it-possible-to-convert-a-c0x-lambda-to-a-clang-block

:)

llvm-svn: 150620
2012-02-15 22:08:38 +00:00
Andrew Trick 690a1fb045 Don't expose DefaultVLIWScheduler
llvm-svn: 150619
2012-02-15 22:06:21 +00:00
Fariborz Jahanian ff51338772 objective-c translator: fixes an obscure rewriting bug
which attempted to rewrite the same meta-data twice.

llvm-svn: 150618
2012-02-15 22:01:47 +00:00
Douglas Gregor 13f09b4191 Factor the construction of the lambda-to-function-pointer conversion function declaration into a separate function. No functionality change
llvm-svn: 150617
2012-02-15 22:00:51 +00:00
David Blaikie af90ec11e1 Provide common include for all diagnostic headers.
Reviewed by Ted Kremenek.

llvm-svn: 150616
2012-02-15 21:58:34 +00:00
Benjamin Kramer a8cafe23e3 Store the warning option corresponding to a diagnostics as an index into the option table instead of storing the name.
Another 8 bytes + relocation removed from every diagnostic on x86_64.

llvm-svn: 150615
2012-02-15 20:57:03 +00:00
Howard Hinnant f9c73f6629 Use __is_polymorphic if available. This fixes http://llvm.org/bugs/show_bug.cgi?id=11983 . Patch contributed by Jonathan Sauer.
llvm-svn: 150614
2012-02-15 20:47:11 +00:00
Howard Hinnant fa8df7db88 tuple was accidentally lacking a valid copy assignment operator. It went undetected because I had failed to test assigning from a const lvalue. This fixes http://llvm.org/bugs/show_bug.cgi?id=11921
llvm-svn: 150613
2012-02-15 20:13:52 +00:00
David Blaikie 040a3a28f1 Remove the unuseful -fdiagnostics-show-name
This option was added in r129614 and doesn't have any use case that I'm aware
of. It's possible that external tools are using these names - and if that's
the case we can certainly reassess the functionality, but for now it lets us
shave out a few unneeded bits from clang.

Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool.
This removes the actual diagnostic name strings from clang entirely.

Reviewed by Chris Lattner & Ted Kremenek.

llvm-svn: 150612
2012-02-15 19:45:34 +00:00
Douglas Gregor 74f7d50f6a When overload resolution picks an implicitly-deleted special member
function, provide a specialized diagnostic that indicates the kind of
special member function (default constructor, copy assignment
operator, etc.) and that it was implicitly deleted. Add a hook where
we can provide more detailed information later.

llvm-svn: 150611
2012-02-15 19:33:52 +00:00
Daniel Dunbar 06b6812b5f utils: Kill NewNightlyTest.pl, which has been replaced by LNT (as far as I know).
llvm-svn: 150610
2012-02-15 19:24:11 +00:00
Howard Hinnant 6560953383 Do not parse sign if a sign is not the next legal character when parsing floating point from an input stream. Fixes http://llvm.org/bugs/show_bug.cgi?id=11871
llvm-svn: 150609
2012-02-15 19:19:37 +00:00
Lang Hames 1b34a72f52 Remove overly conservative assert.
llvm-svn: 150608
2012-02-15 19:04:53 +00:00
Andrew Trick 7a35faea5d Generic "VLIW" packetizer based on a DFA generated from target itinerary.
Patch by Sundeep!

llvm-svn: 150607
2012-02-15 18:55:14 +00:00
Sirish Pande 30804c24ca Optimize redundant sign extends and negation of predicates.
llvm-svn: 150606
2012-02-15 18:52:27 +00:00
Eric Christopher 53da633f93 Revert "Replacing HexagonOptimizeSZExtends with HexagonPeephole."
This reverts commit 1656806a944bbd23e98c6e578810fe02495ab741.

llvm-svn: 150605
2012-02-15 18:34:25 +00:00
Eric Christopher d9811eb7be Revert "Optimize redundant sign extends and negation of predicates"
as it's breaking the build.

This reverts commit 11241abca5e2a313412fed594bb9d9fa2a2057fb.

llvm-svn: 150604
2012-02-15 18:32:25 +00:00
Sirish Pande 99571325f1 Replacing HexagonOptimizeSZExtends with HexagonPeephole.
llvm-svn: 150603
2012-02-15 18:31:35 +00:00
David Chisnall 1026fb0797 Add some Solaris include paths and fix a -lgcc_eh that apparently should be -lgcc_s.
llvm-svn: 150602
2012-02-15 18:24:31 +00:00
Sirish Pande 4736aee81e Optimize redundant sign extends and negation of predicates
llvm-svn: 150601
2012-02-15 18:22:18 +00:00
Nico Weber a92c1eed0f Tweak comment above DiagGroup<"all">.
llvm-svn: 150600
2012-02-15 18:18:51 +00:00
Howard Hinnant 2aa9a38b67 Another stab at fixing http://llvm.org/bugs/show_bug.cgi?id=12007. I earlier missed that there are two common_type definitions and corrected only one of them.
llvm-svn: 150599
2012-02-15 18:08:09 +00:00
Chad Rosier 0bc5132457 Add braces to if clause to make symmetric with associate else clause.
llvm-svn: 150591
2012-02-15 17:36:21 +00:00
Sean Callanan 3ae617943b Stop finding bare symbols when we're explicitly
told to look in a namespace.

llvm-svn: 150590
2012-02-15 17:14:49 +00:00
Douglas Gregor 02267a8e48 A little more lambda capture initialization diagnostics cleanup
llvm-svn: 150589
2012-02-15 17:05:32 +00:00
Douglas Gregor 19666fb1aa Introduce a new initialization entity for lambda captures, and
specialize location information and diagnostics for this entity.

llvm-svn: 150588
2012-02-15 16:57:26 +00:00
David Chisnall a9ed5d76b4 Fix copy-and-paste error in comment
llvm-svn: 150587
2012-02-15 16:25:46 +00:00
Douglas Gregor cf11eb76ed Specialize noreturn diagnostics for lambda expressions.
llvm-svn: 150586
2012-02-15 16:20:15 +00:00
Douglas Gregor 85dae892a4 Fix silly precedence error.
llvm-svn: 150585
2012-02-15 15:59:09 +00:00
Douglas Gregor b9e38f19f7 Specialize the diagnostic complaining about conflicting types of
return statements within a lambda; this diagnostic previously referred
to blocks.

llvm-svn: 150584
2012-02-15 15:57:22 +00:00
Douglas Gregor d8c61785ed Implement code completion support for lambda capture lists.
llvm-svn: 150583
2012-02-15 15:34:24 +00:00
David Meyer 44ec69efe0 For ELF, also call fixSymbolsInTLSFixups() on expressions passed to EmitValue (literal values). Previously only called on expressions in instructions. New test cases added to tls.s, tls-i386.s. Resolves PR11981.
llvm-svn: 150582
2012-02-15 15:09:06 +00:00