Commit Graph

91520 Commits

Author SHA1 Message Date
Chris Lattner cb67a14b3e add some documentation for the most important MC-level classes along with
an overview of mc and the idea of the code emission phase.

llvm-svn: 113707
2010-09-11 23:02:10 +00:00
Chris Lattner 8ee6a4142a Augment -ftrapv to check for divide by zero, mod by zero, and INT_MIN % -1.
Patch by John Regehr!

llvm-svn: 113705
2010-09-11 21:47:09 +00:00
Francois Pichet 9672347122 Update website to reflect that tests are no longer failing on Windows.
llvm-svn: 113704
2010-09-11 21:16:11 +00:00
Douglas Gregor 8694aea7db Add a completely unnecessary "template" keyword to appease GCC
llvm-svn: 113703
2010-09-11 20:47:38 +00:00
Francois Pichet 8f170b8239 Fix last test still failing on Win32. 100% pass rate now!
llvm-svn: 113702
2010-09-11 20:43:12 +00:00
Douglas Gregor a139692ada Update documentation to reflect the addition of support for in-class
initialization of static const floating-point data membmers (John's
patch, in r113663).

llvm-svn: 113701
2010-09-11 20:30:02 +00:00
Douglas Gregor 8a01b2a392 When parsing default function arguments, do not mark any declarations
used in the default function argument as "used". Instead, when we
actually use the default argument, make another pass over the
expression to mark any used declarations as "used" at that point. This
addresses two kinds of related problems:

  1) We were marking some declarations "used" that shouldn't be,
  because we were marking them too eagerly.
  2) We were failing to mark some declarations as "used" when we
  should, if the first time it was instantiated happened to be an
  unevaluated context, we wouldn't mark them again at a later point.

I've also added a potentially-handy visitor class template
EvaluatedExprVisitor, which only visits the potentially-evaluated
subexpressions of an expression. I bet this would have been useful for
noexcept...

Fixes PR5810 and PR8127.

llvm-svn: 113700
2010-09-11 20:24:53 +00:00
Douglas Gregor c6876fe121 Document our extension to constant-fold __builtin_strlen and strlen
llvm-svn: 113699
2010-09-11 18:08:34 +00:00
Douglas Gregor 250ab1dc0e The two libclang crash-recovery tests that involve precompiled
preambles end up leaving the precompiled preambles around. This is by
design, since we do minimal cleanup during crash recovery. However,
it's unfortunate for testing, so introduce a hook that allows these
two tests to put the precompiled preamble somewhere where we can
delete them after testing.

llvm-svn: 113698
2010-09-11 18:05:19 +00:00
Douglas Gregor e10f0e5670 If we fail to create a temporary file for the precompiled preamble,
just abort creation of the precompiled preamble rather than doing
silly things. This is the second part of the fix for the weird
preamble-related failures on Windows. Big thanks to Francois Pichet
for the great detective work!

llvm-svn: 113697
2010-09-11 17:56:52 +00:00
Nuno Lopes d4e42830cb add latest gentoo gcc path
llvm-svn: 113696
2010-09-11 17:51:45 +00:00
Douglas Gregor ce3449f5bd Tweak GetPreamblePCHPath() to more closely match the behavior of the
Windows GetTempPath() function, and be sure to create the directory in
which the precompiled preamble will reside before creating the
temporary file itself.

llvm-svn: 113695
2010-09-11 17:51:16 +00:00
Chris Lattner 1bbb14ab8f add a missed cmov alias, part of rdar://8416805
llvm-svn: 113693
2010-09-11 17:08:22 +00:00
Chris Lattner 3340c3e86c add support for all the setCC aliases. Part of rdar://8416805
llvm-svn: 113692
2010-09-11 17:06:05 +00:00
Rafael Espindola 12d73d1f18 Add support for leb128 of absolute expressions.
llvm-svn: 113691
2010-09-11 16:45:15 +00:00
Chris Lattner b47c042e09 add support for pushfd/popfd which are aliases for pushfl/popfl.
This fixes rdar://8408129 - pushfd and popfd get invalid instruction mnemonic errors

llvm-svn: 113690
2010-09-11 16:39:16 +00:00
Chris Lattner 30561aba20 implement rdar://8407928 - support for in/out with a missing "a" register.
llvm-svn: 113689
2010-09-11 16:32:12 +00:00
Chris Lattner a2a9d16b78 fix the asmparser so that the target is responsible for skipping to
the end of the line on a parser error, allowing skipping to happen
for syntactic errors but not for semantic errors.  Before we would
miss emitting a diagnostic about the second line, because we skipped
it due to the semantic error on the first line:

  foo %eax
  bar %al

This fixes rdar://8414033 - llvm-mc ignores lines after an invalid instruction mnemonic errors

llvm-svn: 113688
2010-09-11 16:18:25 +00:00
Rafael Espindola 6e321507b6 Add missing single quotes.
llvm-svn: 113687
2010-09-11 15:45:48 +00:00
Howard Hinnant 37030a77a0 Fix another const bug in function. Thanks to Daniel Krugler for finding this and the previous bug.
llvm-svn: 113686
2010-09-11 15:33:21 +00:00
Rafael Espindola 2833e392ab Change section_data dumping to print hex numbers instead of using
python's %r.

llvm-svn: 113685
2010-09-11 15:25:58 +00:00
Howard Hinnant 42daac442b Fix const bug in function
llvm-svn: 113684
2010-09-11 15:09:37 +00:00
Anton Korobeynikov 82b3333b72 Disable cxa_atexit by default on MingW.
Patch by Dimitry Andric!

llvm-svn: 113683
2010-09-11 11:17:06 +00:00
Owen Anderson 70f4524427 Invert and-of-or into or-of-and when doing so would allow us to clear bits of the and's mask.
This can result in increased opportunities for store narrowing in code generation.  Update a number of
tests for this change.  This fixes <rdar://problem/8285027>.

Additionally, because this inverts the order of ors and ands, some patterns for optimizing or-of-and-of-or
no longer fire in instances where they did originally.  Add a simple transform which recaptures most of these
opportunities: if we have an or-of-constant-or and have failed to fold away the inner or, commute the order 
of the two ors, to give the non-constant or a chance for simplification instead.

llvm-svn: 113679
2010-09-11 05:48:06 +00:00
Greg Clayton bcf2cfbdc5 Remove the eSymbolTypeFunction, eSymbolTypeGlobal, and eSymbolTypeStatic.
They will now be represented as:
eSymbolTypeFunction: eSymbolTypeCode with IsDebug() == true
  eSymbolTypeGlobal: eSymbolTypeData with IsDebug() == true and IsExternal() == true
  eSymbolTypeStatic: eSymbolTypeData with IsDebug() == true and IsExternal() == false

This simplifies the logic when dealing with symbols and allows for symbols
to be coalesced into a single symbol most of the time.

Enabled the minimal symbol table for mach-o again after working out all the
kinks. We now get nice concise symbol tables and debugging with DWARF in the
.o files with a debug map in the binary works well again. There were issues
where the SymbolFileDWARFDebugMap symbol file parser was using symbol IDs and
symbol indexes interchangeably. Now that all those issues are resolved 
debugging is working nicely.

llvm-svn: 113678
2010-09-11 03:13:28 +00:00
Michael J. Spencer 9efc54890d CMake: Fix mingw32 build.
llvm-svn: 113677
2010-09-11 02:13:48 +00:00
Michael J. Spencer 7c3a5ee996 CMake: Fix mingw32 build.
llvm-svn: 113676
2010-09-11 02:13:39 +00:00
Fariborz Jahanian 933c6723a4 Fixes an obscure bug in importd block variable layout
information when imported variable is used
more than once. Originally though to be a bug in importing
block varibles. Fixes radar 8417746.

llvm-svn: 113675
2010-09-11 01:27:29 +00:00
Jason Molenda 8f22a243b7 Minor copy edits.
llvm-svn: 113674
2010-09-11 00:37:21 +00:00
Johnny Chen 4550154d31 Fixed some comments.
llvm-svn: 113673
2010-09-11 00:23:59 +00:00
Johnny Chen 39d7d4f056 Added [-o <one-liner>] to the "breakpoint command add" lldb command to be able
to specify a one-liner (either scripting or lldb command) inline.

Refactored CommandObjectBreakpointCommandAdd::Execute() a little bit and added
some comments.

Sn now, we use:

breakpoint command add -p 1 -o "conditional_break.stop_if_called_from_a()"

to specify a Python one-liner as the callback for breakpoint #1.

llvm-svn: 113672
2010-09-11 00:18:09 +00:00
Dale Johannesen 3a12890338 Add x86mmx to TableGen.
llvm-svn: 113671
2010-09-11 00:16:46 +00:00
Bill Wendling 27dddd1fd1 Rename ConvertToSetZeroFlag to something more general.
llvm-svn: 113670
2010-09-11 00:13:50 +00:00
Jim Ingham a4601b6496 Don't use lldb syntax in the gdb examples...
llvm-svn: 113669
2010-09-11 00:03:03 +00:00
Bill Wendling d0a5f4e238 No need to recompute the SrcReg and CmpValue.
llvm-svn: 113666
2010-09-10 23:46:12 +00:00
Bill Wendling 041230014c Move some of the decision logic for converting an instruction into one that sets
the 'zero' bit down into the back-end. There are other cases where this logic
isn't sufficient, so they should be handled separately.

llvm-svn: 113665
2010-09-10 23:34:19 +00:00
Sebastian Redl a8bac37bb1 Test destructors in delete expressions and of temporaries for throwing.
llvm-svn: 113664
2010-09-10 23:27:10 +00:00
John McCall db76892e72 Support in-class initialization of static const floating-point data members.
llvm-svn: 113663
2010-09-10 23:21:22 +00:00
Eric Christopher 72497e5d90 Start sketching out ARM fast-isel calls.
llvm-svn: 113662
2010-09-10 23:18:12 +00:00
Jim Ingham bc7d7c8119 Few clarifications.
llvm-svn: 113661
2010-09-10 23:12:45 +00:00
Jim Ingham 53c47f1e2f Move the "Object Description" into the ValueObject, and the add an API to
SBValue to access it.  For now this is just the result of ObjC NSPrintForDebugger,
but could be extended.  Also store the results of the ObjC Object Printer in a
Stream, not a ConstString.

llvm-svn: 113660
2010-09-10 23:12:17 +00:00
Eric Christopher cc766a20d3 For consistency.
llvm-svn: 113659
2010-09-10 23:10:30 +00:00
Jim Ingham baae168e63 Little bit of line wrapping cleanup.
Mainly ExecuteFunction should save & restore the currently selected Thread & Frame.

llvm-svn: 113658
2010-09-10 23:07:48 +00:00
Jim Ingham 59ce7fe05f When the debugger updates its symbol context, if no thread or frame are selected select the first thread's 0th frame.
llvm-svn: 113657
2010-09-10 23:06:30 +00:00
Douglas Gregor c7a7d92ad2 Fix my silly sorting predicate. I hate integer-to-bool conversions
llvm-svn: 113656
2010-09-10 23:05:54 +00:00
Jim Ingham 39bbba498c Always look up the symbols with FindSymbolByID since we are minimizing the symbol list.
llvm-svn: 113655
2010-09-10 23:02:28 +00:00
Eric Christopher cc1367851b Newline at end of file.
llvm-svn: 113654
2010-09-10 22:46:03 +00:00
Bob Wilson f3ecfd0e53 Fix a comment typo.
llvm-svn: 113653
2010-09-10 22:42:21 +00:00
Eric Christopher 1c06917f15 Split out some of the calling convention bits so that they can be
used for fast-isel.

llvm-svn: 113652
2010-09-10 22:42:06 +00:00
Benjamin Kramer 8c35fb0739 Teach InstructionSimplify to fold (A & B) & A -> A & B and (A | B) | A -> A | B.
Reassociate does this but it doesn't catch all cases (e.g. if the operands are i1).

llvm-svn: 113651
2010-09-10 22:39:55 +00:00