Commit Graph

51711 Commits

Author SHA1 Message Date
Bill Wendling 9535ae42ff Exit early if exception handling isn't supported.
llvm-svn: 81454
2009-09-10 18:28:06 +00:00
Mikhail Glushenkov d5107d1333 Allow llvmc to take .bc files as input.
llvm-svn: 81452
2009-09-10 17:04:32 +00:00
Andreas Neustifter 753441e318 Make ProfileEstimator more robust on general CFGs.
llvm-svn: 81450
2009-09-10 16:30:38 +00:00
Chris Lattner eba6c725d0 add another broken version of gcc, thanks to Niels Moller for pointing this out.
llvm-svn: 81449
2009-09-10 16:25:02 +00:00
Mikhail Glushenkov c1e23592ec Distinguish between 'empty' and empty DAG marker.
llvm-svn: 81448
2009-09-10 16:22:02 +00:00
Mikhail Glushenkov 7b047b9c81 Add a logical 'not' operator to llvmc's TableGen dialect.
llvm-svn: 81447
2009-09-10 16:21:38 +00:00
Nuno Lopes bc56152196 fix leakage of Module
llvm-svn: 81445
2009-09-10 14:56:31 +00:00
Benjamin Kramer 4bf4e8686c Add some braces to make newer GCCs happy and update CMakeLists.
llvm-svn: 81443
2009-09-10 11:31:39 +00:00
Andreas Neustifter f4858d59e5 Cleaned up code by factoring out common portions of edge loading into function.
llvm-svn: 81438
2009-09-10 07:12:35 +00:00
Nick Lewycky dddf5dcdaf Correctly handle the case where a comparison is created in one BasicBlock and
used by a terminator in another.

llvm-svn: 81437
2009-09-10 07:02:09 +00:00
Bill Wendling 023ed6480e Comment and whitespace cleanups. No intentional functionality change.
llvm-svn: 81436
2009-09-10 06:50:01 +00:00
Bill Wendling 9e5c2065c5 Revert part of my r81424 patch. I removed what looked like superfluous padding
from the exception tables. However, Duncan explained why it's a can of worms to
do it the GCC way. I went back to doing it the LLVM way and added Duncan's
explanation so that I don't do this again in the future.

llvm-svn: 81434
2009-09-10 06:27:16 +00:00
Evan Cheng c1aec40d64 Add a test case for r81431.
llvm-svn: 81432
2009-09-10 05:08:51 +00:00
Daniel Dunbar e2d76237ec Remove prcontext.
llvm-svn: 81427
2009-09-10 04:56:59 +00:00
Evan Cheng 1d9d4bdc99 Add malloc call utility functions. Patch by Victor Hernandez.
llvm-svn: 81426
2009-09-10 04:36:43 +00:00
Bill Wendling 243ac566e2 Don't hardcode the TType format size. In fact, rework the code so that it's more
like what GCC outputs. The mysterious code to insert padding wasn't in GCC at
all. I modified the TType base offset code to calculate the offset like GCC
does, though.

llvm-svn: 81424
2009-09-10 02:07:37 +00:00
Evan Cheng f6b2404a84 Proper support of non-lazy indirect symbols.
llvm-svn: 81422
2009-09-10 01:23:53 +00:00
Bill Wendling bf56268ff9 Remove the "#if 0" that Noone loved. It wasn't really necessary, because the
code within it was the same inside and out. There's still a problem of the
TypeInfoSize should be the size of the TType format encoding (at least that's
what GCC thinks it should be).

llvm-svn: 81417
2009-09-10 01:12:47 +00:00
Daniel Dunbar a944234a1e MC: Give target specific parsers access to the MCStreamer.
llvm-svn: 81416
2009-09-10 00:59:15 +00:00
Bob Wilson 59e4c84c6f Revert r81171 which was causing pr4927.
llvm-svn: 81415
2009-09-10 00:49:22 +00:00
Bill Wendling a482ec83c5 Pull check for SJLJ EH into a boolean and use that.
llvm-svn: 81409
2009-09-10 00:17:04 +00:00
Bill Wendling 73094e15c4 Use the SizeOfEncodedValue function instead of magic variables for the
sizeof(DW_EH_PE_udata4).

llvm-svn: 81408
2009-09-10 00:13:16 +00:00
Bill Wendling 7b40b5a243 Add helpful comment.
llvm-svn: 81406
2009-09-10 00:04:48 +00:00
Bill Wendling da3e7547fb Believe it or not, this is a simplification. :-)
Basically, this patch is working towards removing the hard-coded values that are
output for the CIE. In particular, the CIE augmentation and the CIE augmentation
size. Both of these should be calculated. In the process, I was able to make a
bunch of code simpler.

The encodings for the personality, LSDA, and FDE in the CIE are still not
correct. They should be generated either from target-specific callbacks (blech!)
or grokked from first-principles.

llvm-svn: 81404
2009-09-09 23:56:55 +00:00
Evan Cheng 71140344f0 Fix double load / store multiple encoding.
llvm-svn: 81403
2009-09-09 23:55:03 +00:00
Chris Lattner d747a9f21f canonicalize namespace gymnastics
llvm-svn: 81402
2009-09-09 23:46:42 +00:00
Dale Johannesen c15bfb5975 Testcase for (llvm-gcc) 81399. Adjust an older
test case to allow for different, functionally
identical output.

llvm-svn: 81400
2009-09-09 23:37:46 +00:00
Bob Wilson a2e8333eed Fix pr4939: Change FPCCToARMCC to translate SETOLE to ARMCC::LS.
See the bug report for details.

llvm-svn: 81397
2009-09-09 23:14:54 +00:00
Chris Lattner 321bc99a74 remove DebugLoc from MCInst and eliminate "Comment printing" from
the MCInst path of the asmprinter.  Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter.  This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.

This also fixes an xcore strangeness where it inserted two tabs
before every instruction.

llvm-svn: 81396
2009-09-09 23:14:36 +00:00
Chris Lattner 5333ec33b3 Fix a subtle bug in "return;" generation which caused us to miss
a return in one case.  Instead of sprinking return handling code
throughout the asmprinter generator, just treat it like any other
normal statement.

llvm-svn: 81395
2009-09-09 23:09:29 +00:00
Daniel Dunbar aec990efd7 Add comment re: clang dependency.
llvm-svn: 81393
2009-09-09 23:01:25 +00:00
Sean Callanan 1358fb7feb Added an abstract superclass, MCDisassembler, for
all disassemblers.

Modified the MemoryObject to support 64-bit address
spaces, regardless of the LLVM process's address
width.

Modified the Target class to allow extraction of a
MCDisassembler.

llvm-svn: 81392
2009-09-09 22:49:13 +00:00
Bill Wendling 572a0df0fc Use the EOL that takes the encoding and translates it into DWARF-English.
llvm-svn: 81382
2009-09-09 21:26:19 +00:00
Bill Wendling eaa71c3ae2 Early exit from function.
llvm-svn: 81381
2009-09-09 21:08:12 +00:00
Bill Wendling afd4f30df4 Small amount of code clean-up: Don't use ".size()" when not necessary.
llvm-svn: 81380
2009-09-09 21:06:24 +00:00
Chris Lattner d9e12345af add a gross hack to get "SrcLine" comments to show up with the
new asmprinter.  Differently gross hack coming next.

llvm-svn: 81379
2009-09-09 20:45:42 +00:00
Chris Lattner 716a8c92d0 hoist the call to processDebugLoc out of the generated
asm printer into the "printInstruction" routine.  This
fixes a problem where the experimental asmprinter would
drop debug labels in some cases, and fixes issues on ppc/xcore
where pseudo instructions like "mr" didn't get debug locs properly.

It is annoying that this moves the call from one place into each
target, but a future set of more invasive refactorings will fix
that problem.

llvm-svn: 81377
2009-09-09 20:34:59 +00:00
Lang Hames 6b81770040 Removed static qualifier from a few index related methods. These methods may require a LiveIntervals instance in future.
llvm-svn: 81374
2009-09-09 20:14:17 +00:00
Andreas Neustifter 1bad7f222a Reverted r81358.
llvm-svn: 81364
2009-09-09 18:19:35 +00:00
Dan Gohman ec4557f324 Fix SplitCriticalEdge to properly update LCSSA form when splitting a
loop exit edge -- new PHIs may be needed not only for the additional
splits that are made to preserve LoopSimplify form, but also for the
original split. Factor out the code that inserts new PHIs so that it
can be used for both. Remove LoopRotation.cpp's code for manually
updating LCSSA form, as it is now redundant. This fixes PR4934.

llvm-svn: 81363
2009-09-09 18:18:18 +00:00
Benjamin Kramer 3cb19a156d Fix build, add missing simicolon.
llvm-svn: 81362
2009-09-09 18:03:46 +00:00
Mike Stump deaf572ca8 Reflow comment.
llvm-svn: 81361
2009-09-09 17:57:16 +00:00
Andreas Neustifter 4c0b2847ef Preserve ProfileInfo.
llvm-svn: 81360
2009-09-09 17:53:39 +00:00
Andreas Neustifter 93bc18f80a Add the first functions for updating ProfileInfo.
llvm-svn: 81359
2009-09-09 17:52:57 +00:00
Andreas Neustifter 505fd86bd2 Cleaned up code by factoring out common portions of edge loading into funcion.
llvm-svn: 81358
2009-09-09 17:51:39 +00:00
Devang Patel cbde073d8c Take lock before removing a node from MDNodeSet.
llvm-svn: 81356
2009-09-09 17:44:26 +00:00
Devang Patel 9a767cb5c0 Enable MDNode uniquing.
llvm-svn: 81355
2009-09-09 17:30:04 +00:00
Dan Gohman c56af25c01 Fix an 80-column violation.
llvm-svn: 81354
2009-09-09 17:17:19 +00:00
Devang Patel 93056ec4e2 Gracefully destroy MDNodes.
llvm-svn: 81353
2009-09-09 17:07:07 +00:00
Chris Lattner 9ded9ac8af revert r81335, which breaks the build.
llvm-svn: 81347
2009-09-09 16:00:57 +00:00
Dan Gohman 16ad903fcf When widening a vector load, use the correct chain. This fixes PR4891.
llvm-svn: 81343
2009-09-09 14:22:57 +00:00
Andreas Neustifter ba545ec6f5 Fixed wrong storage option for ProfileVerifierDisableAssertions.
Fixed non working -profile-verifier-noassert option.
Fixed missing newline in debugEntry().
Cleaned up assert messages. (assert(0 && Message) is still shown, but the message is printed before.)
When verifiying loaded profiles the ProfileVerifier got confused when block was a setjmp target, this is checked now.
When verifiying loaded profiles the ProfileVerifier got confused when block eventually reaching an exit(), this is checked now.

llvm-svn: 81338
2009-09-09 13:01:03 +00:00
Andreas Neustifter 0bd472dc33 Updated ProfileInfo to have clean seperation between different sentinels.
llvm-svn: 81335
2009-09-09 12:48:26 +00:00
Benjamin Kramer 2a1131a42f Add a shortcut for OS X to Path::GetMainExecutable. This gives a nice speedup on
clang's testsuite.

llvm-svn: 81333
2009-09-09 12:09:08 +00:00
Mikhail Glushenkov 5cf21a9668 Copy-pasto.
llvm-svn: 81331
2009-09-09 10:14:55 +00:00
Mikhail Glushenkov 48893a691e Revert 81248 for now.
Program objects have ownership semantics on Windows.

llvm-svn: 81329
2009-09-09 09:52:04 +00:00
Mikhail Glushenkov d2f8a111cd Check that the 'kill' call succeeded.
Thanks to Duncan Sands for spotting this.

llvm-svn: 81328
2009-09-09 09:51:47 +00:00
Torok Edwin a40184aa77 Add testcase for r81322 (PR4933).
llvm-svn: 81327
2009-09-09 09:34:43 +00:00
Anton Korobeynikov bfd22dd704 Provide proper section flags for various BSS flavours
llvm-svn: 81322
2009-09-09 08:48:53 +00:00
Anton Korobeynikov 1df58860e8 Whitespace cleanup
llvm-svn: 81321
2009-09-09 08:41:20 +00:00
Chris Lattner d5f2b3f543 add a testacse for the objc problem that required required r81305
to be temporarily disabled.

llvm-svn: 81320
2009-09-09 06:19:34 +00:00
Chris Lattner afa12db8a6 disable the new asmprinter by default. Both the Mangler and MCSymbol
printing stuff are quoting symbols now, breaking objc testcases.

llvm-svn: 81319
2009-09-09 06:11:14 +00:00
Evan Cheng cf61d68eaf Cast MO.getImm() to unsigned before comparing with an unsigned limit.
llvm-svn: 81318
2009-09-09 06:05:16 +00:00
Jeffrey Yasskin ccbeaf5f94 Make TypeBuilder's result depend on the LLVMContext it's passed.
TypeBuilder was using a local static variable to cache its result. This made it
ignore changes in its LLVMContext argument and always return a type constructed
from the argument to the first call.

llvm-svn: 81316
2009-09-09 05:04:01 +00:00
Daniel Dunbar d556bc48d7 Update test.
llvm-svn: 81314
2009-09-09 02:41:50 +00:00
Daniel Dunbar d44c2e033f Count test correctly with -q.
llvm-svn: 81313
2009-09-09 02:41:42 +00:00
Daniel Dunbar 03e7a26276 Fix another refactoro.
llvm-svn: 81312
2009-09-09 02:41:32 +00:00
Evan Cheng 4029b85567 Make sure to make stub region writable before emission, executable after emission.
llvm-svn: 81311
2009-09-09 01:56:29 +00:00
Evan Cheng 9fa8345b65 Fix arm jit encoding bug introduced by 75048. Some instructions', e.g. MOVi, bit 25 should be set.
llvm-svn: 81310
2009-09-09 01:47:07 +00:00
Evan Cheng 49adbf42b1 Make sure the memory range is writable before memset'ing it.
llvm-svn: 81308
2009-09-09 01:45:24 +00:00
Eric Christopher 98e0a59acc Correct __cxa_end_catch documentation to reflect that it doesn't take any arguments.
llvm-svn: 81307
2009-09-09 01:44:53 +00:00
Evan Cheng a1c6495af7 Remove comments which don't add much to .s readibility.
llvm-svn: 81306
2009-09-09 01:38:23 +00:00
Chris Lattner ba0d9f538f turn the mcinst asmprinter on by default for x86, tweaking two tests to
expect the slight syntax differences in the generated code.

llvm-svn: 81305
2009-09-09 00:41:36 +00:00
Chris Lattner 24083066c8 tidy up
llvm-svn: 81304
2009-09-09 00:40:31 +00:00
Bill Wendling 14a2514c20 Remove failing test...
llvm-svn: 81303
2009-09-09 00:30:25 +00:00
Chris Lattner f2fefedcf8 make sure to send external symbols through the mangler,
this fixes mingw-alloca.ll with the new asmprinter.

llvm-svn: 81301
2009-09-09 00:23:32 +00:00
Dan Gohman c466e31309 Use "opt < %s" instead of "opt %s" to keep the testname away from the grep.
llvm-svn: 81299
2009-09-09 00:22:49 +00:00
Chris Lattner 5fdb699f13 this got merged into lea.ll
llvm-svn: 81298
2009-09-09 00:22:31 +00:00
Chris Lattner 68d3d61ec1 filecheckize
llvm-svn: 81297
2009-09-09 00:19:46 +00:00
Chris Lattner cada1c1012 allow @ in symbol names without quoting the identifier. This
allows things like @PLT without quotes.

llvm-svn: 81296
2009-09-09 00:14:09 +00:00
Bill Wendling ea81960798 Fix PR4865. This syncs up the JIT's DWARF emitter with what's in the
'DwarfException.cpp' file, which changed how CIEs were emitted, the sizes of
some fields, etc.

llvm-svn: 81295
2009-09-09 00:11:02 +00:00
Chris Lattner c5a95c5aad add support for @PLT and friends on external symbols, fixes
x86-64-pic-11.ll with the new asmprinter.

llvm-svn: 81294
2009-09-09 00:10:14 +00:00
Dan Gohman c8054d90fb Eliminate more uses of llvm-as and llvm-dis.
llvm-svn: 81293
2009-09-09 00:09:15 +00:00
Dan Gohman 40503396da Eliminate more uses of llvm-as and llvm-dis.
llvm-svn: 81290
2009-09-08 23:54:48 +00:00
Chris Lattner f87421f088 update various tests for signedness changes in .s file.
llvm-svn: 81289
2009-09-08 23:51:06 +00:00
Chris Lattner 9ef94277f1 adjust for signedness change. I'd appreciate it if an ARM flavored person
could look at this: the top undefined bits of an immediate shouldn't affect
isel (cmp vs cmp.w)

llvm-svn: 81288
2009-09-08 23:44:53 +00:00
Daniel Dunbar 6b3e7bd4ee Merge Archive/extract* tests into one; this avoids a race when tests are run in
parallel (the test should really use temps for the output, though).

llvm-svn: 81287
2009-09-08 23:44:24 +00:00
Chris Lattner 6837964819 merge thumb2-bic2.ll into thumb2-bic.ll and update for signedness changes.
llvm-svn: 81285
2009-09-08 23:41:06 +00:00
Daniel Dunbar a8597a3749 Add Triple::getArchTypeForDarwinArchName, which converts a "Darwin" architecture
name (e.g. "ppc") to the appropriate constant.

Also, StringRefize additional Triple constructor.

llvm-svn: 81274
2009-09-08 23:32:51 +00:00
Chris Lattner 9e5674ae3f tweak this to pass on linux.
llvm-svn: 81273
2009-09-08 23:32:40 +00:00
Daniel Dunbar 6119d878bb Improve JIT error message for users crazy enough to use -march with JIT, and
mention -version in messages about missing targets.

llvm-svn: 81272
2009-09-08 23:32:35 +00:00
Chris Lattner 22833a3cd6 parenthesize symbol names that start with $, fixing X86/dollar-name.ll with
the new asmprinter.

llvm-svn: 81269
2009-09-08 23:20:50 +00:00
Chris Lattner dae3e56cb7 convert to filecheck syntax
llvm-svn: 81267
2009-09-08 23:16:26 +00:00
Chris Lattner e819cfbc71 change selectiondag to add the sign extended versions of immediate operands
to instructions instead of zero extended ones.  This makes the asmprinter
print signed values more consistently.  This apparently only really affects
the X86 backend.

llvm-svn: 81265
2009-09-08 23:05:44 +00:00
Dan Gohman 22f339010c Use "opt < %s" instead of "opt %s" so that opt doesn't print the test
filename in the output, which interferes with the tests' grep lines.

llvm-svn: 81263
2009-09-08 22:57:49 +00:00
Anton Korobeynikov 7697d37777 Unbreak getOnesVector() / getZeroVector() to use valid ARM extended imm's.
llvm-svn: 81262
2009-09-08 22:51:43 +00:00
Dan Gohman 4f2527cd6d Convert a few more opt | llvm-dis to opt -S.
llvm-svn: 81261
2009-09-08 22:41:33 +00:00
Chris Lattner 7896c8ba58 filecheckize some tests
llvm-svn: 81259
2009-09-08 22:38:46 +00:00
Dan Gohman 72a13d2476 Use opt -S instead of piping bitcode output through llvm-dis.
llvm-svn: 81257
2009-09-08 22:34:10 +00:00
Dan Gohman e6a80ced1c Use MemoryBuffer::getBufferIdentifier() in the AsmPrinter instead
of requiring a name be passed in. This makes it use "<stdin>"
instead of "-" and makes it more consistent with the Bitcode reader.

llvm-svn: 81256
2009-09-08 22:20:35 +00:00