Commit Graph

62876 Commits

Author SHA1 Message Date
Chris Lattner 105efaf3df rename Memo/Count to AnonGlobalIDs/NextAnonGlobalID to be more
descriptive.  Thange them to keep track of the ID of a global that is
assigned, not the first mangled name returned for it.  Without doing this,
we are required to always use the same suffix for a global that gets 
mangled.  This means that we can mangle the same global once with $stub
and another time with $non_lazy_ptr or whatever.

llvm-svn: 75561
2009-07-14 00:01:06 +00:00
Ted Kremenek a6904ff7f9 Tidy pretty-printing for SVals, using 'dump()' instead of 'printStdErr()', and implementing operator<< support for llvm::raw_ostream.
llvm-svn: 75560
2009-07-13 23:53:06 +00:00
Owen Anderson 3e42e9f2fc Move more functionality over to LLVMContext.
llvm-svn: 75559
2009-07-13 23:50:59 +00:00
Chris Lattner 327387156a remove Mangler::getTypeID and related data, it was only used for mangling
local symbols and we haven't had type planes since llvm 1.9.

llvm-svn: 75558
2009-07-13 23:50:53 +00:00
Chris Lattner 15c6d8779b remove mangler support for mangling local names. Mangler should only be
used with globals.

llvm-svn: 75557
2009-07-13 23:47:27 +00:00
Chris Lattner 874727fb73 fix CBE & MSIL backends to not use the mangler for non-global symbols.
llvm-svn: 75556
2009-07-13 23:46:46 +00:00
Chris Lattner d8435e9989 don't print redundant @PLT suffixes
llvm-svn: 75554
2009-07-13 23:44:13 +00:00
Evan Cheng 6698ab9ade Revert an accidental commit.
llvm-svn: 75553
2009-07-13 23:44:01 +00:00
Ted Kremenek c8d6746c39 When pretty-printing symbolic regions, use '{' ... '}' to indicate the symbol used for the region (makes it easier to read for nested regions).
llvm-svn: 75550
2009-07-13 23:38:57 +00:00
Fariborz Jahanian 44e56ca949 Fixes a minor bug in pretty printing of ctor defs.
llvm-svn: 75549
2009-07-13 23:31:10 +00:00
Ted Kremenek eabdd984b1 Change pretty-printing API for SymExprs and MemRegions to use a naming convention and style similar to other elements in Clang.
llvm-svn: 75548
2009-07-13 23:31:04 +00:00
Chris Lattner cf485bd781 the mangler should put suffixes on unnamed global's mangled names as well
if present.

llvm-svn: 75547
2009-07-13 23:20:38 +00:00
Owen Anderson 13c240a4c1 Move a bit more functionality to LLVMContext, which apparently wasn't being used anyways.
llvm-svn: 75546
2009-07-13 23:16:26 +00:00
Kevin Enderby 56523ceba1 Added llvm-mc support for parsing the .abort directive.
llvm-svn: 75545
2009-07-13 23:15:14 +00:00
Dan Gohman dbaddda21f Check in a reduced version of this testcase.
llvm-svn: 75544
2009-07-13 23:04:44 +00:00
Dan Gohman fda3c4ac89 Print a newline after printing a Value, now that Value's operator<<
doesn't print a newline.

llvm-svn: 75543
2009-07-13 23:03:05 +00:00
Dan Gohman e2d31aa132 #include "llvm/Assembly/Writer.h" to get the declaration for WriteAsOperand.
llvm-svn: 75542
2009-07-13 22:56:37 +00:00
Chris Lattner ec8efcb44e Two changes:
1) unique globals with the existing "Count" local in Mangler, not with
atomic nonsense.  Using atomics will give us nondeterminstic output
from the compiler when using multiple threads, which is bad.

2) Do not mangle an unknown global name with a type suffix.  We don't
   need this anymore now that llvm ir doesn't have type planes.

llvm-svn: 75541
2009-07-13 22:48:46 +00:00
Devang Patel 9efced9817 Use assertion.
llvm-svn: 75540
2009-07-13 22:46:19 +00:00
Eli Friedman 4b95026194 PR4548: optimize zext+udiv+trunc to udiv.
llvm-svn: 75539
2009-07-13 22:46:01 +00:00
Owen Anderson 85f86dc058 Inline EvalVectorOp in order to get rid of passing-pointer-to-static-methods behavior.
llvm-svn: 75538
2009-07-13 22:41:06 +00:00
Bruno Cardoso Lopes ffb38f8d35 Cleanup the global emission and refactor some code
llvm-svn: 75537
2009-07-13 22:40:39 +00:00
Owen Anderson b258410a1b Fix the build.
llvm-svn: 75536
2009-07-13 22:40:32 +00:00
Daniel Dunbar e12dcd976d NewNightlyTest.pl - Add -configure-args option.
- For adding arbitrary arguments to pass to configure.

llvm-svn: 75535
2009-07-13 22:31:58 +00:00
Eli Friedman 116e3b3ef1 Fix bug in run-line.
llvm-svn: 75534
2009-07-13 22:31:30 +00:00
Dan Gohman 054d2a7837 Add testcases for PR4538, PR4537, and PR4534.
llvm-svn: 75533
2009-07-13 22:30:31 +00:00
Chris Lattner a45c9b67cc clean up some syntax.
llvm-svn: 75532
2009-07-13 22:28:21 +00:00
Eli Friedman 7e1716dc9d Canonicalize boolean +/- a constant to a select.
(I think it's reasonably clear that we want to have a canonical form for 
constructs like this; if anyone thinks that a select is not the best 
canonical form, please tell me.)

llvm-svn: 75531
2009-07-13 22:27:52 +00:00
Dan Gohman dd707af345 Fix a few assertion strings.
llvm-svn: 75530
2009-07-13 22:20:53 +00:00
Dan Gohman 6a9bb1397f Forward-declare Loop and LoopInfo instead of #including LoopInfo.h.
llvm-svn: 75529
2009-07-13 22:19:41 +00:00
Owen Anderson bb2501bbbe These don't really need contexts either.
llvm-svn: 75528
2009-07-13 22:18:28 +00:00
Daniel Dunbar 4f57d77e40 NewNightlyTest.pl - Add -noremoveatend option.
- Like -noremove, except the build directory is still purged prior to building
   but isn't removed at the end of the test run (so the build products can be
   examined if need be).

llvm-svn: 75527
2009-07-13 22:17:49 +00:00
Chris Lattner f8542ba3a9 eliminate a bunch of code in print_pcrel_imm for printing symbols, using
printSymbolOperand instead.

llvm-svn: 75526
2009-07-13 22:07:30 +00:00
Dan Gohman fc7699405c Whitespace cleanups.
llvm-svn: 75525
2009-07-13 22:05:32 +00:00
Dan Gohman e6b4babcbb Fix an 80-column violation.
llvm-svn: 75524
2009-07-13 22:04:06 +00:00
Dan Gohman 80a9942593 Move isLCSSAForm, isLoopInvariant, getCanonicalInductionVariable,
and related functions out of LoopBase and into Loop, since they
are specific to BasicBlock-based loops. This also allows the code
to be moved out-of-line.

llvm-svn: 75523
2009-07-13 22:02:44 +00:00
Oscar Fuentes 304396a8c3 CMake: Refuses to work for out-of-source builds when tablegenned files
are found mixed with the sources. Fixes PR 4522.

llvm-svn: 75522
2009-07-13 21:58:44 +00:00
Ted Kremenek b63f71528e Enhance SimpleSValuator::EvalBinOpNN to recognize the trivial case
where we are comparing a symbolic value against itself, regardless of
the nature of that symbolic value.

This enhancement identified a case where RegionStoreManager is not
correctly symbolicating the values of the pointees of parameters.  The
failing test is now in 'test/Analysis/misc-ps-region-store.m', with
that test file now (temporarily) marked XFAIL.

llvm-svn: 75521
2009-07-13 21:55:12 +00:00
Chris Lattner 40091b8cef move a method and add a comment, no functionality change.
llvm-svn: 75520
2009-07-13 21:53:19 +00:00
Dan Gohman cc85ae132c Make Loop and MachineLoop be subclasses of LoopBase, rather than typedefs,
using the Curiously Recurring Template Pattern with LoopBase.

This will help further refactoring, and future functionality for
Loop. Also, Headers can now foward-declare Loop, instead of pulling
in LoopInfo.h or doing tricks.

llvm-svn: 75519
2009-07-13 21:51:15 +00:00
Daniel Dunbar 9ab53d2b17 Explicitly initialize the options array, MinGW's gcc 4.3.5 appears to have a bug
in array value-initialization.

llvm-svn: 75518
2009-07-13 21:50:47 +00:00
Daniel Dunbar 48b4d1e27e There is no need to value initialize this array.
llvm-svn: 75517
2009-07-13 21:48:50 +00:00
Chris Lattner a479bf1afa refactor operand printing to remove hte last of the "mem" modifier hack. The
only remaining modifier is "subreg".

llvm-svn: 75516
2009-07-13 21:48:33 +00:00
Devang Patel 9d582d1782 Use AsmPrinter's Mangler to remove leading '1' from linkage names.
llvm-svn: 75515
2009-07-13 21:48:26 +00:00
Eli Friedman 42170b0a9e Misc simplifications to InstCombiner::commonIntCastTransforms. Most of
the changes are allowed by not calling this function for bitcasts.  
The Instruction::AShr case is dead because 
SimplifyDemandedInstructionBits handles that case.

llvm-svn: 75514
2009-07-13 21:45:57 +00:00
David Goodwin 160521095b Fix FP elimination code to work for Thumb-2 addrmode AddrModeT2_so. This fixes SingleSource/Benchmarks/Stanford/Queens (among others).
llvm-svn: 75513
2009-07-13 21:43:08 +00:00
Chris Lattner bf25a209dc refactor symbol printing so the whole "mem" thing is handled in fewer places.
llvm-svn: 75512
2009-07-13 21:41:08 +00:00
Dan Gohman e65c917ecf Reapply 75252, with a fix to avoid the infinite recursion case. The
check for avoiding re-analyzing a widening cast needed to happen
earlier, as getSCEV itself may result in a isLoopGuardedByCond query.

llvm-svn: 75511
2009-07-13 21:35:55 +00:00
Oscar Fuentes cb234fec50 CMake: tablegen: Add .td files under the inlude/llvm directory
hierarchy to the list of dependencies.

llvm-svn: 75510
2009-07-13 21:35:00 +00:00
Steve Naroff a63372da72 Remove superfluous call to getAsPointerType()...
llvm-svn: 75509
2009-07-13 21:32:29 +00:00