[llvm] r281981 - Remove extra argument used once on TargetMachine::getNameWithPrefix and inline the result into the singular caller.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 15:12:39 PDT 2016


Reverted here:

Committing to https://llvm.org/svn/llvm-project/llvm/trunk ...
M include/llvm/Target/TargetMachine.h
M lib/CodeGen/TargetLoweringObjectFileImpl.cpp
M lib/Target/TargetMachine.cpp
Committed r282028

I'll need to do a bit more work to untangle this mess.

-eric

On Tue, Sep 20, 2016 at 2:38 PM Eric Christopher <echristo at gmail.com> wrote:

> I'll take a look.
>
> Also, darn.
>
> -eric
>
> On Tue, Sep 20, 2016 at 2:31 PM Peter Collingbourne <peter at pcc.me.uk>
> wrote:
>
> Hi Eric, I think this change or one of your subsequent changes broke
> the sanitizer-x86_64-linux-fast bot.
> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/16536
> Can you please take a look?
>
> Peter
>
> On Tue, Sep 20, 2016 at 9:04 AM, Eric Christopher via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
> Author: echristo
> Date: Tue Sep 20 11:04:50 2016
> New Revision: 281981
>
> URL: http://llvm.org/viewvc/llvm-project?rev=281981&view=rev
> Log:
> Remove extra argument used once on TargetMachine::getNameWithPrefix and
> inline the result into the singular caller.
>
> Modified:
>     llvm/trunk/include/llvm/Target/TargetMachine.h
>     llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
>     llvm/trunk/lib/Target/TargetMachine.cpp
>
> Modified: llvm/trunk/include/llvm/Target/TargetMachine.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=281981&r1=281980&r2=281981&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Target/TargetMachine.h (original)
> +++ llvm/trunk/include/llvm/Target/TargetMachine.h Tue Sep 20 11:04:50 2016
> @@ -265,7 +265,7 @@ public:
>    virtual bool targetSchedulesPostRAScheduling() const { return false; };
>
>    void getNameWithPrefix(SmallVectorImpl<char> &Name, const GlobalValue
> *GV,
> -                         Mangler &Mang, bool MayAlwaysUsePrivate = false)
> const;
> +                         Mangler &Mang) const;
>    MCSymbol *getSymbol(const GlobalValue *GV, Mangler &Mang) const;
>
>    /// True if the target uses physical regs at Prolog/Epilog insertion
>
> Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=281981&r1=281980&r2=281981&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
> +++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Tue Sep 20
> 11:04:50 2016
> @@ -296,7 +296,7 @@ selectELFSectionForGlobal(MCContext &Ctx
>
>    if (EmitUniqueSection && UniqueSectionNames) {
>      Name.push_back('.');
> -    TM.getNameWithPrefix(Name, GV, Mang, true);
> +    Mang.getNameWithPrefix(Name, GV, false);
>    }
>    unsigned UniqueID = MCContext::GenericSectionID;
>    if (EmitUniqueSection && !UniqueSectionNames) {
>
> Modified: llvm/trunk/lib/Target/TargetMachine.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=281981&r1=281980&r2=281981&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/TargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/TargetMachine.cpp Tue Sep 20 11:04:50 2016
> @@ -199,9 +199,8 @@ TargetIRAnalysis TargetMachine::getTarge
>  }
>
>  void TargetMachine::getNameWithPrefix(SmallVectorImpl<char> &Name,
> -                                      const GlobalValue *GV, Mangler
> &Mang,
> -                                      bool MayAlwaysUsePrivate) const {
> -  if (MayAlwaysUsePrivate || !GV->hasPrivateLinkage()) {
> +                                      const GlobalValue *GV, Mangler
> &Mang) const {
> +  if (!GV->hasPrivateLinkage()) {
>      // Simple case: If GV is not private, it is not important to find out
> if
>      // private labels are legal in this case or not.
>      Mang.getNameWithPrefix(Name, GV, false);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
>
>
> --
> --
> Peter
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160920/bd3b78c6/attachment.html>


More information about the llvm-commits mailing list