aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/Writer.cpp
AgeCommit message (Collapse)Author
2003-07-23Fix program: SingleSource/UnitTests/2003-07-09-SignedArgs with the CBEChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7276 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23Simplify code by using ConstantInt::getRawValue instead of checking to seeChris Lattner
whether the constant is signed or unsigned, then casting git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7252 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-21Eliminated dead code.Misha Brukman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7209 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-09Some beautification changes (tabs to spaces, removed extra blank lines);Misha Brukman
no functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7138 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-08Removed size_t from the parameter list of the malloc() prototype in generated CJohn Criswell
code. This prevents a compiler warning on Sparc that causes the tests to fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7125 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-28jmp_buf is really a pointer type that is passed around...Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6935 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-28Add support for the Invoke instruction!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6934 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-28Preserve compatibility with non-gcc compilersChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6932 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-28Fix bug: CBackend/2003-06-28-LinkOnceGlobalVars.llxChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6931 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-25- Fixed name mangling conditions to handle 'linkonce' linkage type. InJoel Stanley
particular, name mangling for GlobalValues only occurs when the linkage type is internal or when the name must be mangled to avoid a collision. See comments in CWriter::getValueName for more information. - 'inline' keyword is now emitted for functions with 'linkonce' linkage type. - Fixed typos. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6898 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-25It seems likely that floats would need a cast too, because they areBrian Gaeke
ordinarily promoted to doubles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6894 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-23Fix 2003-06-23-PromotedExprs.llx -- if we are adding two bytes we betterBrian Gaeke
explicitly cast the result to be a byte, or C will gleefully promote it to int. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6869 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17lib/CWriter/Writer.cpp: Copy AsmWriter's ConstantFP checking code hereBrian Gaeke
into a new function FPCSafeToPrint(), and use it in printConstant() and printFunction() to decide whether we should output ConstantFPs as floating-point constants or as references to stack-allocated variables. lib/VMCore/AsmWriter.cpp: Fix an apparent typo in the code mentioned above. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6762 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17Fairly major change: emit fixed sized allocas in the entry block as a variable,Chris Lattner
instead of a variable pointer and an alloca. All accesses to the variable then use the address-of operator to access it. This plays better with the internal GCC code generation phases, which bail early on functions which contain allocas. It also makes the code a bit easier to read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6734 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16Don't include alloca.h on FreeBSD.Brian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6728 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16Fix typeoChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6704 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16Fix bug: CBackend/2003-06-11-HexConstant.llChris Lattner
Fix bug: CBackend/2003-06-11-LiteralStringProblem.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6697 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06Don't output explicit initializers for globals that are zero initializedChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6651 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02Fix bug: CBackend/2003-06-01-NullPointerType.llChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6526 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01Fix a bug with casts to bool. This fixes testcase ↵Chris Lattner
UnitTests/2003-05-31-CastToBool.c git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6507 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29Eliminate unnecessary ->get calls that are now automatically handled.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6397 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-17Add support for setjmp/longjmp primitivesChris Lattner
Patch checked in for Bill Wendling :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6241 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-14Casts are now unnecessaryChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6199 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-13Fix bug: CBackend/2003-05-13-VarArgFunction.llChris Lattner
In C, a prototype with no arguments is varargs. A prototype that takes void has zero args. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6172 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12Fix bug: CWriter/2003-05-12-IntegerSizeWarning.cChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6128 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08Add support for variable argument functions!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6044 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03Fix bug: UnitTests/2003-05-02-DependantPHI.cChris Lattner
Fix testcase MultiSource/Ptrdist-ks git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6000 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03* Eliminate using declsChris Lattner
* Fix some styleistic things * Fix bug: CWriter/2002-05-16-NameCollide.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5988 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23Fix problem where labels were being incorrectly elided, and fix problemChris Lattner
where PHI copies where not emitted for the default label of switch insts git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5882 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23Fix the super obnoxious "cast to pointer from integer of different size" ↵Chris Lattner
warnings git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5881 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23Remove unneccesary &*Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5871 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22Add support for the switch instruction to the CWriterChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5847 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-12Fixed alloca declaration problem on sun.Joel Stanley
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5546 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 - Eliminated the deferred symbol table stuff in Module & Function, it reallyChris Lattner
wasn't an optimization and it was causing lots of bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18*** empty log message ***Nick Hildenbrandt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4754 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18*** empty log message ***Nick Hildenbrandt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4745 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07_REALLY_ fix the float constant problemChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4609 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07Print out 'float' constants correctlyChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4607 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06Fixes escapeing bug in strings. Fixes test case ↵Nick Hildenbrandt
test/Regression/CBackend/2002-11-06-PrintEscaped.c git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4583 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06Loads and stores can't be inlined. This fixes test/Singlesource/matrixTransposeNick Hildenbrandt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4579 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-01Fixed bug in Regression/CBackend/2002-10-30-FunctionPointerAlloca.llNick Hildenbrandt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4486 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28Casting NULL can cause problems so lets just not cast NULL to anything.Nick Hildenbrandt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4349 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28*** empty log message ***Nick Hildenbrandt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4343 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-23Malloc prototyping now works even if the original file had its own prototype ↵Nick Hildenbrandt
for malloc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4271 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16Fix bug: CBackend/2002-10-16-External.llChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4201 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16Fix bug: test/Regression/CBackend/2002-10-15-OpaqueTypeProblem.llChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4190 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11Instead of adding stdlib we just prototype malloc correctly.Nick Hildenbrandt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4118 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-11Sun requires you to include stdlib to use mallocNick Hildenbrandt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4117 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-05Bug fix: In preventing static global variables from being printed twice,Vikram S. Adve
I also prevented external globals from being printed twice, but they should (extern declaration and definition). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4043 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03Add parens around constant calls to getelemptr to properly associate the ↵Nick Hildenbrandt
reference git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4032 91177308-0d34-0410-b5e6-96231b3b80d8