[llvm-commits] [llvm-gcc-4.2] r108356 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Eric Christopher
echristo at apple.com
Wed Jul 14 13:50:46 PDT 2010
Author: echristo
Date: Wed Jul 14 15:50:46 2010
New Revision: 108356
URL: http://llvm.org/viewvc/llvm-project?rev=108356&view=rev
Log:
Revert part of the previous patch here. This is causing some miscompiles
later on via SelectionDAG, likely when debug info is present.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=108356&r1=108355&r2=108356&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed Jul 14 15:50:46 2010
@@ -1771,6 +1771,13 @@
DECL_SIZE(decl) != 0 && TREE_CODE(DECL_SIZE_UNIT(decl)) != INTEGER_CST)
SeenVLA = decl;
+ // If this is just the rotten husk of a variable that the gimplifier
+ // eliminated all uses of, but is preserving for debug info, ignore it.
+ // TODO: This affects the correctness of the warning we're attempting to
+ // watch above.
+ if (TREE_CODE(decl) == VAR_DECL && DECL_VALUE_EXPR(decl))
+ return;
+
// Gimple temporaries are handled specially: their DECL_LLVM is set when the
// definition is encountered.
if (isGimpleTemporary(decl))
More information about the llvm-commits
mailing list