Commit Graph

104617 Commits

Author SHA1 Message Date
Evan Cheng 2f64754031 Fix typo
llvm-svn: 130190
2011-04-26 04:57:37 +00:00
Greg Clayton 2ed751bd47 Changed the emulate instruction function to take emulate options which
are defined as enumerations. Current bits include:

        eEmulateInstructionOptionAutoAdvancePC
        eEmulateInstructionOptionIgnoreConditions

Modified the EmulateInstruction class to have a few more pure virtuals that
can help clients understand how many instructions the emulator can handle:

        virtual bool
        SupportsEmulatingIntructionsOfType (InstructionType inst_type) = 0;


Where instruction types are defined as:

//------------------------------------------------------------------
/// Instruction types
//------------------------------------------------------------------    
typedef enum InstructionType
{
    eInstructionTypeAny,                // Support for any instructions at all (at least one)
    eInstructionTypePrologueEpilogue,   // All prologue and epilogue instructons that push and pop register values and modify sp/fp
    eInstructionTypePCModifying,        // Any instruction that modifies the program counter/instruction pointer
    eInstructionTypeAll                 // All instructions of any kind

}  InstructionType;


This allows use to tell what an emulator can do and also allows us to request
these abilities when we are finding the plug-in interface.

Added the ability for an EmulateInstruction class to get the register names
for any registers that are part of the emulation. This helps with being able
to dump and log effectively.

The UnwindAssembly class now stores the architecture it was created with in
case it is needed later in the unwinding process.

Added a function that can tell us DWARF register names for ARM that goes
along with the source/Utility/ARM_DWARF_Registers.h file: 

        source/Utility/ARM_DWARF_Registers.c
        
Took some of plug-ins out of the lldb_private namespace.

llvm-svn: 130189
2011-04-26 04:39:08 +00:00
Rafael Espindola 80cb3cb1d6 Print all the moves at a given label instead of just the first one.
Remove previous DwarfCFI hack.

llvm-svn: 130187
2011-04-26 03:58:56 +00:00
Nick Lewycky c58d293a6f Rename everything to follow LLVM style ... I think.
Add support for switch and indirectbr edges. This works by densely numbering
all blocks which have such terminators, and then separately numbering the
possible successors. The predecessors write down a number, the successor knows
its own number (as a ConstantInt) and sends that and the pointer to the number
the predecessor wrote down to the runtime, who looks up the counter in a
per-function table.

Coverage data should now be functional, but I haven't tested it on anything
other than my 2-file synthetic test program for coverage.

llvm-svn: 130186
2011-04-26 03:54:16 +00:00
NAKAMURA Takumi 72516899db include/clang/AST/StmtIterator.h: std::pair should be provided by <utility>. libcxx needs it.
llvm-svn: 130183
2011-04-26 03:17:13 +00:00
Rafael Espindola 3584ab6cc6 No relocation produces a SLEB or ULEB, make sure they are handled in MC.
llvm-svn: 130181
2011-04-26 02:17:58 +00:00
Chris Lattner 6f83d06ffa Enhance MemDep: When alias analysis returns a partial alias result,
return it as a clobber.  This allows GVN to do smart things.

Enhance GVN to be smart about the case when a small load is clobbered
by a larger overlapping load.  In this case, forward the value.  This
allows us to compile stuff like this:

int test(void *P) {
  int tmp = *(unsigned int*)P;
  return tmp+*((unsigned char*)P+1);
}

into:

_test:                                  ## @test
	movl	(%rdi), %ecx
	movzbl	%ch, %eax
	addl	%ecx, %eax
	ret

which has one load.  We already handled the case where the smaller
load was from a must-aliased base pointer.

llvm-svn: 130180
2011-04-26 01:21:15 +00:00
Eric Christopher 6f095d613a Temporarily revert r130176, it appears to have broken a few tests.
llvm-svn: 130179
2011-04-26 01:02:04 +00:00
Devang Patel cae2fbd6fc Let dwarf writer allocate extra space in the debug location expression. This space, if requested, will be used for complex addresses of the Blocks' variables.
llvm-svn: 130178
2011-04-26 00:12:46 +00:00
Devang Patel 420c8de92e Emit intrinsic at current insert point, not at the end of current block.
llvm-svn: 130177
2011-04-25 23:52:27 +00:00
Stuart Hastings 83da03c2ab Turn on byval parameters in Clang for ARM APCS. rdar://problem/7662569
llvm-svn: 130176
2011-04-25 23:48:12 +00:00
Devang Patel 4f325d1f0f Simplify. There is no need to have a method to just call another method.
llvm-svn: 130175
2011-04-25 23:43:36 +00:00
Johnny Chen d0fef81e38 For lldbutil.py, Change a bunch of function names to all lower case formats to be consistent.
And modify the test cases accordingly.

llvm-svn: 130174
2011-04-25 23:38:13 +00:00
Fariborz Jahanian 24ac1599fc Generalize case for built-in expressions having
side-effect to generate their ir. Not just for
__builtin_expect. // rdar://9330105

llvm-svn: 130172
2011-04-25 23:10:07 +00:00
Devang Patel 2606f4d6d2 Rename a local variable.
llvm-svn: 130171
2011-04-25 23:05:21 +00:00
Devang Patel 8ce24133fd Rename a method to match what it really does.
s/addVariableAddress/addFrameVariableAddress/g

llvm-svn: 130170
2011-04-25 23:02:17 +00:00
Argyrios Kyrtzidis e1b97c40c5 For the warnings related to -Wparentheses, display first the note about how to silence the warning and
any other suggestion after that. Related to rdar://9300260.

llvm-svn: 130169
2011-04-25 23:01:29 +00:00
Ted Kremenek 4f76f4ae31 Re-enable disable free optimization where the FrontendAction is not freed when -disable-free is passed. This accidentally was commited in r128011.
llvm-svn: 130168
2011-04-25 22:57:55 +00:00
Devang Patel 2688e4aba6 Do not drop a variable's complex address if it is not based on frame base.
Observed this while reading code, so I do not have a test case handy here.

llvm-svn: 130167
2011-04-25 22:52:55 +00:00
Dan Gohman 6acd95b3c1 Fix an iterator invalidation bug.
llvm-svn: 130166
2011-04-25 22:48:29 +00:00
Eric Christopher 238a21f2d5 Make this test disable fast isel as it's not needed.
llvm-svn: 130165
2011-04-25 22:39:46 +00:00
Ted Kremenek 8dcc466886 When generating printf fixits, preserve the original formating for unsigned integers (e.g., 'x', 'o').
llvm-svn: 130164
2011-04-25 22:32:59 +00:00
Fariborz Jahanian 5a866c0bf2 Ir-gen the side-effect(s) when __builtin_expect is
constant-folded. // rdar://9330105

llvm-svn: 130163
2011-04-25 22:30:02 +00:00
Argyrios Kyrtzidis daa41f59e4 Fix a crash when ASTReader emits diagnostic when another one is in flight. Fixes rdar//9334563.
llvm-svn: 130162
2011-04-25 22:23:56 +00:00
Lenny Maiorani e553e40467 Implements the strncmp() checker just like the strcmp() checker, but with bounds. Requires LLVM svn r129582.
llvm-svn: 130161
2011-04-25 22:21:00 +00:00
Chris Lattner f5ba0415df mark a large static table static. Pointed out by Michael Ilseman!
llvm-svn: 130160
2011-04-25 22:14:33 +00:00
Caroline Tice c2bbb49aff Add 'lldb_private' namespace where necessary to prevent ambiguity and
resulting infinite loops.

llvm-svn: 130159
2011-04-25 22:05:51 +00:00
Johnny Chen d369908dac Move two functions around.
llvm-svn: 130158
2011-04-25 22:04:05 +00:00
Argyrios Kyrtzidis bd0a3fe5e8 'extern' variables in functions don't shadow externs in global scope. Fixes rdar://8883302, this time for C++ as well.
llvm-svn: 130157
2011-04-25 21:39:50 +00:00
Greg Clayton 7be2542fc9 Renamed UnwindAssemblyProfiler to UnwindAssembly along with its source files.
llvm-svn: 130156
2011-04-25 21:14:26 +00:00
Greg Clayton 078daac55d Even more renaming.
llvm-svn: 130155
2011-04-25 21:07:40 +00:00
Greg Clayton ffc922e389 More moving things around for the unwind plan and assembly unwind plug-ins.
llvm-svn: 130154
2011-04-25 21:05:07 +00:00
Chris Lattner 50686bf55c Improve adherence to general style, use "foo_t &x" instead of "foo_t& x"
llvm-svn: 130153
2011-04-25 21:02:12 +00:00
Nico Weber a0b2dddcf0 Add libstdc++ search paths for GCC 4.6.0 on Arch Linux. Patch by Jakub Wieczorek.
llvm-svn: 130152
2011-04-25 20:59:30 +00:00
Chris Lattner 63e9190f71 allow adding a FoldingSetNodeID to a FastFoldingSetNode, resolving PR9499,
patch by Johannes Schaub!

llvm-svn: 130151
2011-04-25 20:58:50 +00:00
Daniel Dunbar 462e7ed497 Driver: When compilation fails, don't try to remove output files we don't have
write access to.

llvm-svn: 130150
2011-04-25 20:43:05 +00:00
Chris Lattner f03406f103 don't use compound literals in MM macros, since they will be instantiated
into user code which may warn about them with -pedantic.  Patch by Jonathan Sauer!

llvm-svn: 130149
2011-04-25 20:42:40 +00:00
Chris Lattner cdb591af03 fix PR9474, a crash with -fshort-enum and C++ templates: when instantiating
the enum decl, we need to use an integer type the same size as the enumerator,
which may not be the promoted type with packed enums.

llvm-svn: 130148
2011-04-25 20:37:58 +00:00
Johnny Chen fc87e2dd5c Make SBBreakpointLocation::GetDescription() API to be consistent with SBTarget,
i.e., with 'SBStream &description' first, followed by 'DescriptionLevel level'.

Modify lldbutil.py so that get_description() for a target or breakpoint location
can just take the lldb object itself without specifying an option to mean option
lldb.eDescriptionLevelBrief.  Modify TestTargetAPI.py to exercise this logic path.

llvm-svn: 130147
2011-04-25 20:23:05 +00:00
Fariborz Jahanian 743dda49d9 Recognize gcc's ms_struct pragma (and ignore for now).
This is wip.

llvm-svn: 130138
2011-04-25 18:49:15 +00:00
Chris Lattner 6e29892430 add a missed bitfield instcombine.
llvm-svn: 130137
2011-04-25 18:44:26 +00:00
Douglas Gregor 90609aa394 Minor tweak to avoid having to dig through canonical types multiple times when checking a qualification conversion
llvm-svn: 130136
2011-04-25 18:40:17 +00:00
Greg Clayton dc5eb693bd Put plug-ins into the correct directories as they were incorrectly located
in a Utility directory.

llvm-svn: 130135
2011-04-25 18:36:36 +00:00
Johnny Chen 6b2a27c777 Fix test failure for '-A i386'.
llvm-svn: 130134
2011-04-25 18:20:52 +00:00
Johnny Chen 2b14d9b3f6 Update startstr argument of self.expect() to "a.out`sum(int, int)" to respond to recent change.
llvm-svn: 130133
2011-04-25 17:40:47 +00:00
Francois Pichet aa48352f82 Add Windows SEH keywords.
llvm-svn: 130132
2011-04-25 17:23:15 +00:00
Akira Hatanaka 0e7ee666b7 Lower BlockAddress node when relocation-model is static.
llvm-svn: 130131
2011-04-25 17:10:45 +00:00
Devang Patel 734f2218ac A dbg.declare may not be in entry block, even if it is referring to an incoming argument. However, It is appropriate to emit DBG_VALUE referring to this incoming argument in entry block in MachineFunction.
llvm-svn: 130129
2011-04-25 16:33:52 +00:00
Douglas Gregor b90f5185b6 When Sema::ClassifyName() finds an invalid ivar reference, return an
invalid expression rather than the far-more-generic "error". Fixes a
mild regression in error recovery uncovered by the GCC testsuite.

llvm-svn: 130128
2011-04-25 15:05:41 +00:00
Benjamin Kramer ba446cc12a Make tests more useful.
lit needs a linter ...

llvm-svn: 130126
2011-04-25 10:12:01 +00:00