Commit Graph

95513 Commits

Author SHA1 Message Date
Duncan Sands 641baf1646 Generalize the reassociation transform in SimplifyCommutative (now renamed to
SimplifyAssociativeOrCommutative) "(A op C1) op C2" -> "A op (C1 op C2)",
which previously was only done if C1 and C2 were constants, to occur whenever
"C1 op C2" simplifies (a la InstructionSimplify).  Since the simplifying operand
combination can no longer be assumed to be the right-hand terms, consider all of
the possible permutations.  When compiling "gcc as one big file", transform 2
(i.e. using right-hand operands) fires about 4000 times but it has to be said
that most of the time the simplifying operands are both constants.  Transforms
3, 4 and 5 each fired once.  Transform 6, which is an existing transform that
I didn't change, never fired.  With this change, the testcase is now optimized
perfectly with one run of instcombine (previously it required instcombine +
reassociate + instcombine, and it may just have been luck that this worked).

llvm-svn: 119002
2010-11-13 15:10:37 +00:00
Duncan Sands e5ac78e16e Fix typo pointed out by Trevor Harmon.
llvm-svn: 119001
2010-11-13 12:16:27 +00:00
Bill Wendling 9430eb489c Comment out the defms until they're activated.
llvm-svn: 119000
2010-11-13 11:20:05 +00:00
Bill Wendling 705ec77ab5 Add uses of the *_ldst_multi multiclasses. These aren't used yet.
llvm-svn: 118999
2010-11-13 10:57:02 +00:00
Bill Wendling c4c642832d Convert the modes to lower case.
llvm-svn: 118998
2010-11-13 10:43:34 +00:00
Bill Wendling f2fa04acfc Minor cleanups:
- Get the opcode once.
- Add a ParserMatchClass to reglist.

llvm-svn: 118997
2010-11-13 10:40:19 +00:00
Chandler Carruth 456daba135 Switch to using %clang_cc1 properly rather than manually passing the -cc1 flag.
llvm-svn: 118996
2010-11-13 10:19:35 +00:00
Bill Wendling e69afc6bb7 Add *_ldst_mult multiclasses to the ARM back-end. These will be used in the
future to separate out the ia, ib, da, db variants of the load/store multiple
instructions.

llvm-svn: 118995
2010-11-13 09:09:38 +00:00
John McCall c5e62b47af Introduce five new cast kinds for various conversions into and
between complex types.

llvm-svn: 118994
2010-11-13 09:02:35 +00:00
John McCall d005ac937e Bring UsualArithmeticConversionsType back into Sema and cast the
operands appropriately.  There are a lot of missing complex-related
cast kinds.

llvm-svn: 118993
2010-11-13 08:17:45 +00:00
Daniel Dunbar fe0c28f4db MC: Simplify Mach-O and ELF object writer implementations.
- What was I thinking?????

llvm-svn: 118992
2010-11-13 07:33:40 +00:00
Zhongxing Xu 1b038fa00f Do not add implicit dtors for CXXBindTemporaryExpr with elidable
CXXConstructExpr.

llvm-svn: 118991
2010-11-13 07:30:59 +00:00
Ted Kremenek bc8b378848 Rewrite reverse iteration loop in a more natural countdown manner.
llvm-svn: 118990
2010-11-13 05:55:56 +00:00
Ted Kremenek 89bad8a6e7 CursorVisitor: migrate CXXNewExpr and CXXDefaultArgExpr over to data-recursive algorithm.
llvm-svn: 118989
2010-11-13 05:55:53 +00:00
John McCall 528729872e Pre-compute all possible usual-arithmetic-conversions results for the
promoted arithmetic types for which builtin operator candidates are
emitted.  A few of these need further analysis.

Removes all the uses of UsualArithmeticConversionsType except the
core function in SemaExpr.cpp.

llvm-svn: 118988
2010-11-13 05:51:15 +00:00
Wesley Peck 82471189b7 Fixed error and re-enabled MBlaze MC disassembler tests.
llvm-svn: 118987
2010-11-13 05:48:21 +00:00
Ted Kremenek fdc5237b5e CursorVisitor: special-case CompoundStmt in data-recursion algorithm so we don't have to enqueue
its children and then reverse them.

llvm-svn: 118986
2010-11-13 05:38:03 +00:00
Evan Cheng 79ff5238e9 Conditional moves are slightly more expensive than moves.
llvm-svn: 118985
2010-11-13 05:14:20 +00:00
Ted Kremenek f2819198d2 Refine IdempotentOperationChecker::PathWasCompletelyAnalyzed() to also check
BlockEdges, BlockEntrances, and BlockExits for the target block value.

llvm-svn: 118984
2010-11-13 05:12:26 +00:00
Ted Kremenek cf9dbe9c20 Teach IdempotentOperations::PathWasCompletelyAnalyzed to also consider items remaining in the
worklist that could have impacted the evaluation of a block.

Fixes <rdar://problem/8663596>.

llvm-svn: 118983
2010-11-13 05:04:52 +00:00
Ted Kremenek b02788dbee Add GRWorkList::VisitItemsInWorkList() to allow a client to introspect the contents of a worklist.
This API required changing the BFS worklist to use a deque instead of a queue, but that is better
for performance reasons anyway.

llvm-svn: 118982
2010-11-13 05:04:49 +00:00
Rafael Espindola 2d006b1ade Fix warning and add support for printing gnu_unique_object.
llvm-svn: 118981
2010-11-13 04:55:06 +00:00
Rafael Espindola 4bcf94c75a Parse and record the gnu_unique_object type.
llvm-svn: 118980
2010-11-13 04:51:02 +00:00
Greg Clayton 580c5dacd0 Got namespace lookup working and was able to print a complex "this" as an
expression. This currently takes waaaayyyyy too much time to evaluate. We will
need to look at the expression parser and find ways to optimize the info we
provide and get this to evaluate quicker. I believe the performance issue is
currently related to us always providing a complete C++ class type when asked
about a C++ class which can cause a lot of information to be pulled since all
classes will be fully created (methods, base classes, members, all their 
types). We will need to give the classes back the parser and mark them as 
having external sources and get parser (Sema) to query us when it needs more
info. This should bring things up to an acceptable level.

llvm-svn: 118979
2010-11-13 04:18:24 +00:00
Jim Grosbach 748736d9da Trailing whitespace.
llvm-svn: 118978
2010-11-13 04:17:15 +00:00
Dale Johannesen bee283837f This test stops after disassembling 1 instructions on
darwin and, judging from the buildbots, Linux.
Removing it for now, but this is not the right fix,
Wesley please look at it.

llvm-svn: 118977
2010-11-13 03:55:04 +00:00
Greg Clayton 526e5afb2d Modified the lldb_private::Type clang type resolving code to handle three
cases when getting the clang type:
- need only a forward declaration
- need a clang type that can be used for layout (members and args/return types)
- need a full clang type

This allows us to partially parse the clang types and be as lazy as possible.
The first case is when we just need to declare a type and we will complete it
later. The forward declaration happens only for class/union/structs and enums.
The layout type allows us to resolve the full clang type _except_ if we have
any modifiers on a pointer or reference (both R and L value). In this case
when we are adding members or function args or return types, we only need to
know how the type will be laid out and we can defer completing the pointee
type until we later need it. The last type means we need a full definition for
the clang type.

Did some renaming of some enumerations to get rid of the old "DC" prefix (which
stands for DebugCore which is no longer around).

Modified the clang namespace support to be almost ready to be fed to the
expression parser. I made a new ClangNamespaceDecl class that can carry around
the AST and the namespace decl so we can copy it into the expression AST. I
modified the symbol vendor and symbol file plug-ins to use this new class.

llvm-svn: 118976
2010-11-13 03:52:47 +00:00
Rafael Espindola f01b622902 Parse and remember discriminators in .loc line. I try to output them with
another patch.
This lets us parse a bit more of the gcc 4.5 output.

llvm-svn: 118975
2010-11-13 03:18:27 +00:00
Wesley Peck 99837837ec Add test cases that should have been committed with 118969.
llvm-svn: 118974
2010-11-13 02:51:00 +00:00
Daniel Dunbar 868e3f0977 JIT: More nitty style tweakage, aka territory marking.
llvm-svn: 118973
2010-11-13 02:48:57 +00:00
Daniel Dunbar 2ed3fe08e9 report_fatal_error: Simplify a possible ambiguity.
llvm-svn: 118972
2010-11-13 02:48:51 +00:00
Daniel Dunbar 078f33c53a More style nittiness.
llvm-svn: 118971
2010-11-13 02:48:46 +00:00
Daniel Dunbar 056db5adcd Clean up some doxyments/style.
llvm-svn: 118970
2010-11-13 02:48:41 +00:00
Wesley Peck b3099e6863 1. Adding test cases for MBlaze MC disassembler.
2. Fixing several errors in disassembler uncovered by test cases.
3. Fixing invalid encoding of PCMPEQ and PCMPNE uncovered by test cases.

llvm-svn: 118969
2010-11-13 02:37:59 +00:00
Evan Cheng 2bcb8daa44 Add conditional move of large immediate.
llvm-svn: 118968
2010-11-13 02:25:14 +00:00
John McCall 988ffb7a11 Store the list of arithmetic types as a static array of member pointers
instead of copying them all out at the start.  Not a significant
optimization.

llvm-svn: 118967
2010-11-13 02:01:09 +00:00
John McCall e84af4e486 Introduce a null-to-pointer implicit cast kind.
llvm-svn: 118966
2010-11-13 01:35:44 +00:00
Jim Grosbach 1aa5863a3e Swap multiclass operand order for consistency with other patterns.
llvm-svn: 118965
2010-11-13 01:28:30 +00:00
Ted Kremenek 809c6fc93c CursorVisitor: Migrate BlockExpr, CXXTemporaryOBjectExpr, and ObjCEncodeExpr to data-recursive algorithm.
llvm-svn: 118964
2010-11-13 01:09:29 +00:00
Jim Grosbach 69fd90e661 Continue ARM indexed load refactoring. Multiclass for LDR{B} pre/post indexed
instructions.

llvm-svn: 118963
2010-11-13 01:07:20 +00:00
Rafael Espindola 1d37f35eea Fix the encoding of negative line deltas.
llvm-svn: 118962
2010-11-13 01:06:27 +00:00
Ted Kremenek 573411b539 CursorVisitor: Migrate DeclRefExpr over to data-recursion algorithm.
llvm-svn: 118961
2010-11-13 00:58:18 +00:00
Ted Kremenek 03b8602490 CursorVisitor: migrate GotoStmt to data-recursive algorithm.
llvm-svn: 118960
2010-11-13 00:58:15 +00:00
Daniel Dunbar 4a92fcb9fd Fix some more 80-col violas.
llvm-svn: 118959
2010-11-13 00:55:45 +00:00
Daniel Dunbar e4f4743409 Fix 80-col violation / non-sensicalness.
llvm-svn: 118958
2010-11-13 00:55:42 +00:00
Ted Kremenek 072e637671 CursorVisitor: migrate DeclStmt over to data-recursive algorithm.
llvm-svn: 118957
2010-11-13 00:36:50 +00:00
Ted Kremenek acff73c3bf CursorVisitor: Convert logic for populating data-recursion worklist from a switch statement to a StmtVisitor. No functionality change.
llvm-svn: 118956
2010-11-13 00:36:47 +00:00
Jim Grosbach 2f790749e8 More ARM load/store indexed refactoring. Also fix an incorrect IndexMode
flag for the LDRT/STRT family instructions as a side effect.

llvm-svn: 118955
2010-11-13 00:35:48 +00:00
Dan Gohman 1279fc47f9 Revert r118917, which is implicated in the llvm-gcc-i386-linux-selfhost failure.
llvm-svn: 118954
2010-11-13 00:31:40 +00:00
Daniel Dunbar bfd762b9e8 Update CMake.
llvm-svn: 118953
2010-11-13 00:28:32 +00:00