[llvm] r186705 - s/compiler_used/compiler.used/.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sat Jul 20 07:48:18 PDT 2013


looking

On 19 July 2013 20:06, David Dean <david_dean at apple.com> wrote:
> I think this change is causing a failure on one of the bots (It's building clang with lto)
>
> http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-Rlto/builds/554
>
> Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-RA/llvm/include/llvm/Support/Casting.h, line 239.
> Stack dump:
> 0.      Running pass 'Global Variable Optimizer' on module 'ld-temp.o'.
> clang: error: unable to execute command: Illegal instruction: 4
> clang: error: linker command failed due to signal (use -v to see invocation)
> make[2]: *** [/Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-Rlto/clang-build/Release/bin/llc] Error 254
> make[1]: *** [llc/.makeall] Error 2
> make[1]: *** Waiting for unfinished jobs....
> Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-RA/llvm/include/llvm/Support/Casting.h, line 239.
> Stack dump:
> 0.      Running pass 'Global Variable Optimizer' on module 'ld-temp.o'.
> clang: error: unable to execute command: Illegal instruction: 4
> clang: error: linker command failed due to signal (use -v to see invocation)
>
>
>
> On 19 Jul 2013, at 11:44 AM, Rafael Espindola <rafael.espindola at gmail.com> wrote:
>
>> Author: rafael
>> Date: Fri Jul 19 13:44:51 2013
>> New Revision: 186705
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=186705&view=rev
>> Log:
>> s/compiler_used/compiler.used/.
>>
>> We were incorrectly using compiler_used instead of compiler.used. Unfortunately
>> the passes using the broken name had tests also using the broken name.
>>
>> Modified:
>>    llvm/trunk/lib/IR/Verifier.cpp
>>    llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
>>    llvm/trunk/test/CodeGen/X86/compiler_used.ll
>>    llvm/trunk/test/Transforms/GlobalOpt/alias-used.ll
>>    llvm/trunk/test/Verifier/llvm.compiler_used-invalid-type.ll
>>
>> Modified: llvm/trunk/lib/IR/Verifier.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=186705&r1=186704&r2=186705&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/IR/Verifier.cpp (original)
>> +++ llvm/trunk/lib/IR/Verifier.cpp Fri Jul 19 13:44:51 2013
>> @@ -460,7 +460,7 @@ void Verifier::visitGlobalVariable(Globa
>>   }
>>
>>   if (GV.hasName() && (GV.getName() == "llvm.used" ||
>> -                       GV.getName() == "llvm.compiler_used")) {
>> +                       GV.getName() == "llvm.compiler.used")) {
>>     Assert1(!GV.hasInitializer() || GV.hasAppendingLinkage(),
>>             "invalid linkage for intrinsic global variable", &GV);
>>     Type *GVType = GV.getType()->getElementType();
>>
>> Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=186705&r1=186704&r2=186705&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original)
>> +++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Fri Jul 19 13:44:51 2013
>> @@ -3040,7 +3040,7 @@ bool GlobalOpt::OptimizeGlobalCtorsList(
>>   return true;
>> }
>>
>> -/// \brief Given "llvm.used" or "llvm.compiler_used" as a global name, collect
>> +/// \brief Given "llvm.used" or "llvm.compiler.used" as a global name, collect
>> /// the initializer elements of that global in Set and return the global itself.
>> static GlobalVariable *
>> collectUsedGlobalVariables(const Module &M, const char *Name,
>> @@ -3093,7 +3093,7 @@ static void setUsedInitializer(GlobalVar
>> }
>>
>> namespace {
>> -/// \brief An easy to access representation of llvm.used and llvm.compiler_used.
>> +/// \brief An easy to access representation of llvm.used and llvm.compiler.used.
>> class LLVMUsed {
>>   SmallPtrSet<GlobalValue *, 8> Used;
>>   SmallPtrSet<GlobalValue *, 8> CompilerUsed;
>> @@ -3104,7 +3104,7 @@ public:
>>   LLVMUsed(const Module &M) {
>>     UsedV = collectUsedGlobalVariables(M, "llvm.used", Used);
>>     CompilerUsedV =
>> -        collectUsedGlobalVariables(M, "llvm.compiler_used", CompilerUsed);
>> +        collectUsedGlobalVariables(M, "llvm.compiler.used", CompilerUsed);
>>   }
>>   typedef SmallPtrSet<GlobalValue *, 8>::iterator iterator;
>>   iterator usedBegin() { return Used.begin(); }
>> @@ -3135,13 +3135,13 @@ static bool hasUseOtherThanLLVMUsed(Glob
>>
>>   assert((!U.usedCount(&GA) || !U.compilerUsedCount(&GA)) &&
>>          "We should have removed the duplicated "
>> -         "element from llvm.compiler_used");
>> +         "element from llvm.compiler.used");
>>   if (!GA.hasOneUse())
>>     // Strictly more than one use. So at least one is not in llvm.used and
>> -    // llvm.compiler_used.
>> +    // llvm.compiler.used.
>>     return true;
>>
>> -  // Exactly one use. Check if it is in llvm.used or llvm.compiler_used.
>> +  // Exactly one use. Check if it is in llvm.used or llvm.compiler.used.
>>   return !U.usedCount(&GA) && !U.compilerUsedCount(&GA);
>> }
>>
>> @@ -3150,7 +3150,7 @@ static bool hasMoreThanOneUseOtherThanLL
>>   unsigned N = 2;
>>   assert((!U.usedCount(&V) || !U.compilerUsedCount(&V)) &&
>>          "We should have removed the duplicated "
>> -         "element from llvm.compiler_used");
>> +         "element from llvm.compiler.used");
>>   if (U.usedCount(&V) || U.compilerUsedCount(&V))
>>     ++N;
>>   return V.hasNUsesOrMore(N);
>>
>> Modified: llvm/trunk/test/CodeGen/X86/compiler_used.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/compiler_used.ll?rev=186705&r1=186704&r2=186705&view=diff
>> ==============================================================================
>> --- llvm/trunk/test/CodeGen/X86/compiler_used.ll (original)
>> +++ llvm/trunk/test/CodeGen/X86/compiler_used.ll Fri Jul 19 13:44:51 2013
>> @@ -5,7 +5,7 @@
>> @Z = internal global i8 4
>>
>> @llvm.used = appending global [1 x i8*] [ i8* @Z ], section "llvm.metadata"
>> - at llvm.compiler_used = appending global [2 x i8*] [ i8* @X, i8* bitcast (i32* @Y to i8*)], section "llvm.metadata"
>> + at llvm.compiler.used = appending global [2 x i8*] [ i8* @X, i8* bitcast (i32* @Y to i8*)], section "llvm.metadata"
>>
>> ; CHECK-NOT: .no_dead_strip
>> ; CHECK: .no_dead_strip       _Z
>>
>> Modified: llvm/trunk/test/Transforms/GlobalOpt/alias-used.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/alias-used.ll?rev=186705&r1=186704&r2=186705&view=diff
>> ==============================================================================
>> --- llvm/trunk/test/Transforms/GlobalOpt/alias-used.ll (original)
>> +++ llvm/trunk/test/Transforms/GlobalOpt/alias-used.ll Fri Jul 19 13:44:51 2013
>> @@ -9,8 +9,8 @@
>> @llvm.used = appending global [3 x i8*] [i8* bitcast (void ()* @fa to i8*), i8* bitcast (void ()* @f to i8*), i8* @ca], section "llvm.metadata"
>> ; CHECK-DAG: @llvm.used = appending global [3 x i8*] [i8* bitcast (void ()* @fa to i8*), i8* bitcast (void ()* @f to i8*), i8* @ca], section "llvm.metadata"
>>
>> - at llvm.compiler_used = appending global [4 x i8*] [i8* bitcast (void ()* @fa3 to i8*), i8* bitcast (void ()* @fa to i8*), i8* @ia, i8* @i], section "llvm.metadata"
>> -; CHECK-DAG: @llvm.compiler_used = appending global [2 x i8*] [i8* bitcast (void ()* @fa3 to i8*), i8* @ia], section "llvm.metadata"
>> + at llvm.compiler.used = appending global [4 x i8*] [i8* bitcast (void ()* @fa3 to i8*), i8* bitcast (void ()* @fa to i8*), i8* @ia, i8* @i], section "llvm.metadata"
>> +; CHECK-DAG: @llvm.compiler.used = appending global [2 x i8*] [i8* bitcast (void ()* @fa3 to i8*), i8* @ia], section "llvm.metadata"
>>
>> @sameAsUsed = global [3 x i8*] [i8* bitcast (void ()* @fa to i8*), i8* bitcast (void ()* @f to i8*), i8* @ca]
>> ; CHECK-DAG: @sameAsUsed = global [3 x i8*] [i8* bitcast (void ()* @f to i8*), i8* bitcast (void ()* @f to i8*), i8* @c]
>>
>> Modified: llvm/trunk/test/Verifier/llvm.compiler_used-invalid-type.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/llvm.compiler_used-invalid-type.ll?rev=186705&r1=186704&r2=186705&view=diff
>> ==============================================================================
>> --- llvm/trunk/test/Verifier/llvm.compiler_used-invalid-type.ll (original)
>> +++ llvm/trunk/test/Verifier/llvm.compiler_used-invalid-type.ll Fri Jul 19 13:44:51 2013
>> @@ -1,6 +1,6 @@
>> ; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
>>
>> - at llvm.compiler_used = appending global [1 x i32] [i32 0], section "llvm.metadata"
>> + at llvm.compiler.used = appending global [1 x i32] [i32 0], section "llvm.metadata"
>>
>> ; CHECK:       wrong type for intrinsic global variable
>> -; CHECK-NEXT: [1 x i32]* @llvm.compiler_used
>> +; CHECK-NEXT: [1 x i32]* @llvm.compiler.used
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> -David
>
>



More information about the llvm-commits mailing list