首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法从gcc的-fdump-tree-gimple中找出/[ex]运算符

无法从gcc的-fdump-tree-gimple中找出/[ex]运算符
EN

Stack Overflow用户
提问于 2012-02-02 10:35:37
回答 1查看 161关注 0票数 2

当使用-fdump-tree-gimple选项(GCC 4.6.1)编译C++时,我得到的代码中包含以下函数:

代码语言:javascript
复制
std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = int, _Alloc = std::allocator<int>] (struct _Vector_base * const this)
{
  int * D.8482;
  long int D.8483;
  int * D.8484;
  long int D.8485;
  long int D.8486;
  long int D.8487;
  long unsigned int D.8488;
  int * D.8489;
  struct _Vector_impl * D.8490;

  {
    try
      {
        D.8482 = this->_M_impl._M_end_of_storage;
        D.8483 = (long int) D.8482;
        D.8484 = this->_M_impl._M_start;
        D.8485 = (long int) D.8484;
        D.8486 = D.8483 - D.8485;
        D.8487 = D.8486 /[ex] 4;
        D.8488 = (long unsigned int) D.8487;
        D.8489 = this->_M_impl._M_start;
        std::_Vector_base<int, std::allocator<int> >::_M_deallocate(this, D.8489, D.8488);
      }
    finally
      {
        D.8490 = &this->_M_impl;
        std::_Vector_base<int, std::allocator<int>::_Vector_impl::~_Vector_impl (D.8490);
      }
  }
  <D.8393>:
}

您可以通过编写一个使用std::vector<int>的简单程序来获得此代码。在任何情况下,我不理解的代码部分是D.8487 = D.8486 /[ex] 4;行。我查看了/usr/include/c++/4.6.1/std_vector.h的源代码,它的析构函数是调用_M_deallocate的一行程序。有人知道操作符/[ex]代表什么吗?到目前为止,我唯一注意到的是RHS操作数是向量参数化的类型的大小。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-02-02 23:05:34

/[ex]意味着它是一个精确的除法表达式。

摘自《GCC内部原理手册》:

EXACT_DIV_EXPR

EXACT_DIV_EXPR代码用于表示整数除法,其中分子是分母的精确倍数。这允许后端在当前目标的TRUNC_DIV_EXPR、CEIL_DIV_EXPR和FLOOR_DIV_EXPR中选择较快的一个。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9106414

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档